Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sort and reverse list in python

sort and reverse function
l=eval(input("enter"))
l.sort()
print(l)
l.reverse()
print(l)
#output
enter[1,2,3]
[1, 2, 3]
[3, 2, 1]
 
PREVIOUS NEXT
Tagged: #sort #reverse #list #python
ADD COMMENT
Topic
Name
9+8 =