(Jul-17-2019, 02:35 PM)Gateux Wrote: 1. Accept inputs in both upper and lower case
- I can't figure how to do this, as right now my code only accept upper case e.g "Y
The string method
lower
can be used to make the comparison always be between lower case strings.users_input = 'Y' if users_input.lower() == 'y': print('user input Yes')
Output:user input Yes
Note: there is also a upper
string method if the code was to compare upper strings.