About 12,200,000 results
Open links in new tab
  1. python - Best way to remove elements from a list - Stack Overflow

    Feb 2, 2014 · Scenarios: If you have few items to remove say one element or between 1 to 5. If you have to remove multiple items in a sequence. If you have to remove different items based on a …

  2. Remove all occurrences of a value from a list? - Stack Overflow

    Jul 21, 2009 · In Python remove() will remove the first occurrence of value in a list. How to remove all occurrences of a value from a list? This is what I have in mind: >>> …

  3. python - How to remove multiple items from a list in just one …

    In python, I know how to remove items from a list: item_list = ['item', 5, 'foo', 3.14, True] item_list.remove ('item') item_list.remove (5) The above code removes the values 5 and 'item' from item_...

  4. 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?

  5. How to completely remove Python from a Windows machine?

    I would like to completely remove Python from my system. I tried running the 2.7 and 2.6 msi files and choosing remove Python and then running only 2.6 and reinstalling it. Still stuff don't work. How do I …

  6. python - Remove list element without mutation - Stack Overflow

    3 We can do it without using in built remove function and also without creating new list variable Code:

  7. How to remove an element from a list by index - Stack Overflow

    Dec 13, 2016 · How do I remove an element from a list by index? I found list.remove(), but this slowly scans the list for an item by value.

  8. python - Removing duplicates in lists - Stack Overflow

    Nov 1, 2011 · In fact, despite the title "Python removing duplicates in lists", it doesn't seem like OP wanted to remove duplicates from within the same list at all. Rather, it looks like OP wanted to take …

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

    How can I remove a key from a Python dictionary? Asked 13 years, 6 months ago Modified 1 year, 1 month ago Viewed 3.1m times

  10. How to remove or hide x-axis labels from a plot - Stack Overflow

    Apr 27, 2024 · 0 Remove xlabel The xlabels come from dataframe column labels, so if you pass lists / numpy ndarrays to x, y or hue parameter, their labels won't show because these data types are …