while True: ui = input(">>> ") if ui in ['hi', 'HI', 'Hi']: print("Hello") else: print("I did not understand what you said")
Hi How do you do?
>>> Hello >>> I did not understand what you said >>>
Traceback (most recent call last): File "./prog.py", line 2, in <module> EOFError: EOF when reading a line