@ Introducing Python: Modern Computing in Simple Packages by Bill Lubanovic (No. 1270 / 12833)
Let's undo that last insertion:
>>> del marxes[-1]
J'ai essayé de le mettre en œuvre. 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)
Résultat d'exécution
Success time: 0.01 memory: 9992 signal:0
[]
['Futon', 'Monitor desk', 'Internet', 'Electronic Line', 'Water Line', 'Gas Line', 'etc']
['Futon']
Le [Comment] de @ shiracamus (http://qiita.com/7of9/items/1a519b8ac45b6ccda478/#comment-ad4f64e8889000048779) m'a dit pop ()
et help ([]. Pop)
..
Merci pour l'information.