Save!
I've been looking for elegant ways to reverse strings, arrays, and integers in Python.
What do you think of my codes below and what do they suggest to improve them? They work ...
Thank you!
frase = 'eu gosto de python'[::-1]
numero = [12, 13, 14, 15, 16, 17]
inteiro = 123456
numeroInvertido = int(str(inteiro)[::-1])
print frase
print numero [::-1]
print numeroInvertido