Introduction: Python - Add Input to Unknown Number of Elements to a List Using Append

About: Occupation: tech support
# Created using Thonny IDE for Python;  www.Thonny.org
# Add Input to Unknown Number of Elements to a List Using Append # Create empty list to define list to be entered by user enteredlist = [] enterdata = "y" # Start while loop to populate enteredlist while enterdata == "y": newlistelement = input("Enter an element into the list: ") # Add the element entered by user into the list using the append method enteredlist.append(newlistelement) enterdata = input("Would you like to enter another element into the list? (y/n): ") print ("This list of entered elements is: ", enteredlist)