@ Introducing Python: Modern Computing in Simple Packages by Bill Lubanovic (No. 1270 / 12833)
Let's undo that last insertion:
>>> del marxes[-1]
Ich habe versucht, es umzusetzen. http://ideone.com/yRBduB
TodoList = []
print(TodoList)
TodoList.append('Futon')
TodoList.append('Monitor desk')
TodoList.append('Internet')
TodoList.append('Electronic Line')
TodoList.append('Water Line')
TodoList.append('Gas Line')
TodoList.append('etc')
print(TodoList)
for loop in range(6):
del TodoList[-1]
print(TodoList)
Ausführungsergebnis
Success time: 0.01 memory: 9992 signal:0
[]
['Futon', 'Monitor desk', 'Internet', 'Electronic Line', 'Water Line', 'Gas Line', 'etc']
['Futon']
@ shiracamus 'Kommentar sagte mir "pop ()" und "help ([]. Pop)" ..
Danke für die Information.