Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. a = input('Y/n ')
  2. if a != 'n' or a != 'N':
  3.     print('Yay')
  4. else:
  5.     print('Nay')
  6.  
  7. """
  8. In every case its going 'Yay', because in any case one condition becomes true
  9. it works, if i lower the input and
  10. change condition to >>> if a != 'n':
  11. Are there any other ways so i can achieve what i am looking for, or i have to use >>> if a.lower() != 'n':
  12. """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement