SHARE
TWEET

Untitled

a guest Mar 20th, 2017 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # create an empty list to hold values from the user
  2. listy = []
  3.  
  4. # read first input
  5. inputo = input("Enter a Value (Blank line to quit): ")
  6.  
  7. # while the value entered by the user is not a blank line
  8. while inputo != "" :
  9.     #within loop - build the list
  10.     listy.append(inputo)
  11.  
  12.     # read the next value from the user
  13.     inputo = input("Enter a Value (Blank line to quit): ")
  14.  
  15.     # SORT the list
  16. listy.sort
  17.  
  18. #If the length of the list is 0
  19. if len(listy) == 0:
  20.     # Tell them that the list is 0
  21.     print("Could you just, follow instructions? You entered Nothing. ")
  22.  
  23. print(listy[::-1])
RAW Paste Data
Top