Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. list = ['my', 'list', 'of', 'stuff']
  2. options = range(0, len(list))
  3. fileChoice = -1
  4. while fileChoice not in options:
  5.     try:
  6.         fileChoice = int(input("Choose the number of the file to restore > "))
  7.     except ValueError:
  8.         print("not an option")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement