Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # secure_if_raw_input.py -- by adding strip()
- for i in range(5):
- text = raw_input("y/n: ").strip()
- if text.lower() in ['y','yes']:
- # demo
- import random
- for ii in range(20):
- print random.choice(range(5, 10))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement