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
September 12, 2021
Program to print time in seconds to time in minutes
September 17, 2021
Program to find simple and compound interest
Comments
Post a Comment