0
How do I make a to do list in python?
Everytime I try to add an item to the list I get an error and if I try to add something to the list a second time, when the program prints the list it only shows the most recent item I added, not the item I entered the first time https://code.sololearn.com/cEiNpRDRSfbJ/?ref=app
2 Réponses
+ 1
Try this
q=1
l = list()
while q!='Quit':
q=input("Enter element to add: ")
if q!="Quit":
l.append(q)
print(l)
+ 1
This is what I do to populate lists:
https://code.sololearn.com/cwX97i1ieLEY/?ref=app