Advertisement
furas

Python - indentions

May 18th, 2017
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. # --- version 1 ---
  2.  
  3. y = [1, 2, 3, 4]
  4. while True:
  5.     s = input()
  6.     s = int(s)
  7.     # s = int(input())
  8.     if s in y:
  9.         print('good guess')
  10.         break
  11.     else:
  12.         print('try again')
  13.  
  14. # --- version 2 ---
  15.  
  16. y = ["1", "2", "3", "4"]
  17. while True:
  18.     s = input()
  19.     if s in y:
  20.         print('good guess')
  21.         break
  22.     else:
  23.         print('try again')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement