Skip to main content
Search
Search This Blog
Programming in Python
Share
Get link
Facebook
X
Pinterest
Email
Other Apps
Labels
Lists
December 27, 2021
Program to sort a list in ascending and descending order
#sort a list in ascending and descending order
l=eval(input("Enter a list "))
l.sort()
print("Sorted in ascending order",l)
l.sort(reverse=True)
print("Sorted in ascending order",l)
Comments
Popular Posts
January 25, 2022
Program to generate 8-digit Password
Comments
Post a Comment