+ 4

[SOLVED]User input equals anything in a tuples?

https://code.sololearn.com/cWTuiwISr5ik/?ref=app in this code I need it to output hi of az equals anything in in the tuple rightinput

9th Jul 2018, 5:05 PM
LONGTIEšŸ‘”
LONGTIEšŸ‘” - avatar
3 Answers
+ 6
9th Jul 2018, 5:17 PM
LONGTIEšŸ‘”
LONGTIEšŸ‘” - avatar
+ 6
Here's another way: az = input().lower() h = "hi", "hello", "hey" rightinput = h + ("yo", "sup") if az in h: print("hello") elif az in rightinput: print("hi") else: print("why")
9th Jul 2018, 5:44 PM
David Ashton
David Ashton - avatar
+ 6
David Ashton very nice thx
9th Jul 2018, 5:45 PM
LONGTIEšŸ‘”
LONGTIEšŸ‘” - avatar