I am confused with a python program to print certain numbers in discending order. Can anybody help me with this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people's questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Harshitha
It’s very simple
Take input as 5 numbers then map it go on sorting after sorting reverse the number as you want numbers in descending order then print it.
Example:
Print(“input”)
nums = list(map(int,input().split()))
nums.sort
Nums.reverse()
print(“descending order is”)
print (mums)