Simple while loop, that appends user input into a list ; not working

Put the input() inside the loop like so:

a = []
while True:
    user_input = input("Please enter a number: ")
    if user_input == "done":
        break
    user_input = int(user_input)
    a.append(user_input)
print(a)