Edit this Python code to make the while loop break when the user inputs an empty string.
user_input = input("Please enter a word:")
while user_input:
    print(user_input)
    user_input = input("Please enter a word:")
user_input = input("Please enter a word:")
while user_input != "":
    print(user_input)
    user_input = input("Please enter a word:")