About 13,000,000 results
Open links in new tab
  1. Difference between del, remove, and pop on lists in Python

    Related post on similar lines for set data structure - Runtime difference between set.discard and set.remove methods in Python?

  2. Python pop() vs pop(0) - Stack Overflow

    Jun 11, 2014 · Python pop () vs pop (0) Asked 11 years, 6 months ago Modified 4 years, 1 month ago Viewed 59k times

  3. pop function in Python - Stack Overflow

    The argument passed to pop function works as an index. So instead of popping the element with the value of 1, it pops the element at the index 1 which is the second element of the list.

  4. python - How do I remove the first item from a list? - Stack Overflow

    Dec 13, 2010 · This solution (which has been around since Python 3.0) should definitively be preferred if you need both, head and tail. Do you perhaps have some additional information at hand about the …

  5. In Python, what does dict.pop (a,b) mean? - Stack Overflow

    Mar 14, 2013 · The second question is covered in the Python Language Reference: If the form “*identifier” is present, it is initialized to a tuple receiving any excess positional parameters, defaulting …

  6. How can I remove a key from a Python dictionary?

    One case where dict.pop() may be useful is if you want to create a new dictionary with the popped key-value pairs, effectively splitting a dictionary into two in one for-loop.

  7. Popping items from a list using a loop in Python [duplicate]

    Closed 2 years ago. I'm trying to write a for loop in python to pop out all the items in a list but two, so I tried this:

  8. python - Pop index out of range - Stack Overflow

    Aug 29, 2012 · Along with all the other answers, the important part about the pop() function is that it removes the value from the array, thus changing the indexes. After popping index 4, your list is left …

  9. What is the time complexity of popping elements from list in Python ...

    Oct 12, 2008 · I wonder what the time complexity of the pop method of list objects is in Python (in CPython particulary). Also does the value of N for list.pop(N) affect the complexity?

  10. python - Equivalent for pop on strings - Stack Overflow

    Jun 15, 2012 · Equivalent for pop on strings Asked 13 years, 6 months ago Modified 6 years, 3 months ago Viewed 86k times