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]