Your wrote : list.pop([i]) which doesn’t work on my ipython ; instead list.pop(i) works fine. Don’t know if it’s of any help. I’ve read all chapters from 1 to 15, and it is amazingly useful. Thanks a lot. Christian
It's explained in the docs: list.pop([i]) Remove the item at the given position in the list, and return it. If no index is specified, a.pop() removes and returns the last item in the list. (The square brackets around the i in the method signature denote that the parameter is optional, not that you should type square brackets at that position. You will see this notation frequently in the Python Library Reference.) On Wed, Jan 13, 2016 at 6:57 PM, Christian Delacroix <cd458@cornell.edu> wrote:
Your wrote :
list.pop([i]) which doesn’t work on my ipython ; instead
list.pop(i) works fine.
Don’t know if it’s of any help. I’ve read all chapters from 1 to 15, and it is amazingly useful. Thanks a lot.
Christian
_______________________________________________ docs mailing list docs@python.org https://mail.python.org/mailman/listinfo/docs
participants (2)
-
Christian Delacroix
-
Senthil Kumaran