You are viewing a single comment's thread. Return to all comments →
print(*sorted(arr,key=int),sep='\n')
or
for i in sorted(arr,key=int): print(i)
Or use sort since it is faster than sorted -Link
To sort : arr.sort(key=int) and to print : print(*arr,sep='\n') or for i in arr: print(i)
Input can be taken as :
arr=[] for i in range(int(input())):arr.append(input())
Seems like cookies are disabled on this browser, please enable them to open this website
Big Sorting
You are viewing a single comment's thread. Return to all comments →
Python 3 one liner :-)
or
Or use sort since it is faster than sorted -Link
Input can be taken as :