Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # create an empty list to hold values from the user
- listy = []
- # read first input
- inputo = input("Enter a Value (Blank line to quit): ")
- # while the value entered by the user is not a blank line
- while inputo != "" :
- #within loop - build the list
- listy.append(inputo)
- # read the next value from the user
- inputo = input("Enter a Value (Blank line to quit): ")
- # SORT the list
- listy.sort
- #If the length of the list is 0
- if len(listy) == 0:
- # Tell them that the list is 0
- print("Could you just, follow instructions? You entered Nothing. ")
- print(listy[::-1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement