I was working off of the answer in this question: Python Interactive Shell Type Application
My code looks like this
def main(): while True: s =
if s == 'hello': print('hi') elif s == 'exit': break else: print('Undefined input')
This should take care of undefined user input.