Python’s built-in list class has append() method. We can get user input and add it to list till user presses Enter key. An infinite while loop contains input() function and append() method
L=[] while True: item=input("enter new item") if item=='': break L.append(item) print ("List : ",L)