About 52 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 · 1 When you use the ' ' command in python; you're still iterating by index, item is still implicitly set as . each pop (0) shifts the items to the left, and the next is referenced as , so, the third …

  3. pop function in Python - Stack Overflow

    What is the difference between these two ( a.pop (a [0]) and a.pop (0) )? Thank you! (This is the first time that I'm asking a question on this platform, sorry if it is inappropriate)

  4. python - Pop multiple items from the beginning and end of a list ...

    Jun 16, 2014 · Pop multiple items from the beginning and end of a list Asked 11 years, 10 months ago Modified 1 year, 5 months ago Viewed 216k times

  5. List Manipulation in Python with pop () - Stack Overflow

    Jun 5, 2014 · List Manipulation in Python with pop () Asked 15 years, 1 month ago Modified 11 years, 10 months ago Viewed 35k times

  6. python - How to .pop () a specific item on a 2D list? - Stack Overflow

    If I .pop() fruit_list it would return ['cherry', 'orange', 'strawberry'], because that is the last item of list but is there a way in Python to just pop 'mango', the last item of an inner list?

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

    Mar 14, 2013 · What's happening on the next line when *args is passed along in the call to self.data.pop is the inverse of this - the tuple *args is expanded to of positional parameters which get passed …

  8. python - Best way to remove elements from a list - Stack Overflow

    Feb 2, 2014 · pop : removing element from the list by using the index. taking less time. del : is a python statement that removes a name from a namespace, or an item from a dictionary, or an item from a …

  9. Using pop for removing element from 2D array - Stack Overflow

    Using pop for removing element from 2D array Asked 11 years, 6 months ago Modified 5 years, 11 months ago Viewed 51k times

  10. 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.