while True: my_str = input("Enter a string: ") if my_str == \'\': print ("Goodbye!") break words = [word.lower() for word in my_str.split()]