How to put the list on reversed alphabetical order | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

How to put the list on reversed alphabetical order

Tried to put a list on reversed alphabetical order without changing the original list. Can you tell me what is wrong and other ways to do it ? code link : https://code.sololearn.com/ce8GGBc95Kd5/#py

12th Dec 2017, 1:44 AM
TomƔs Nascimento
TomƔs Nascimento - avatar
1 Resposta
+ 3
It should be sorted(places, reverse=true), not reverse(sorted(places)).
12th Dec 2017, 2:20 AM
blackcat1111
blackcat1111 - avatar