0
¿Por qué si creo una variable que contenga el reverso de una lista, e imprimo esa variable el resultado es none?
lista = ["mañana", "cålida"] reverso = lista.reverse() print (reverso) >>> none.
5 Answers
0
Hablo un poco de espanol...
Prueba esto:
lista = ["mañana", "cålida"]
for word in reversed(lista):
print (word)
Good luck! :)
0
thanks for your answer, but what interests me is to understand the logic. Why the variable does not contain the reverse?
0
what you want to achieve?
reverse of the list or reverse of the letters of each word? (reversed is a function/action that change the variables order inside de list from
1 to n => n to 1
i am not sure what you call "variable" :p if you can explain a bit,maybe i can help you a bit
0
variable is the container name. for example, in this case the variable would be lista.
y pues, lo que tenia pensado era que mostrara la lista de la siguiente manera ["cålida","mañana"]
0
well with what i gived you earyler that you gonna achieve :) word1 will be at the end and word2 gonna be first