About 251,000 results
Open links in new tab
  1. How to Remove Item from a List in Python - GeeksforGeeks

    Nov 20, 2024 · Theremove () method deletes the first occurrence of a specified value in the list. If multiple items have the same value, only the first match is removed. The pop () method can be …

  2. Remove an item from a list in Python (remove, pop, clear, del)

    Apr 17, 2025 · In Python, you can remove items (elements) from a list using methods such as remove(), pop(), and clear(). You can also use the del statement to delete items by index or …

    Missing:

    • Algo

    Must include:

  3. Python Remove Array Item - GeeksforGeeks

    Dec 8, 2024 · This article will cover different methods to remove items from an array in Python. The remove () method removes the first occurrence of a specified value from the array. If the …

  4. python - Delete an element from a dictionary - Stack Overflow

    May 1, 2011 · TL;DR: Use either del dct[key_to_remove] or dct.pop(key_to_remove) to remove keys. There are three main answers given on this page to remove a key from a dictionary dct : …

    Missing:

    • Algo

    Must include:

  5. How to Remove Items from a List in Python [+Examples]

    May 14, 2025 · 7 Easy Ways to Remove an Item from a List in Python [+Examples] Removing items from Python lists requires choosing the right method for your specific scenario. While …

  6. Python - Remove List Items - W3Schools

    Remove the first item: The del keyword can also delete the list completely. Delete the entire list: The clear() method empties the list. The list still remains, but it has no content. Clear the list …

    Missing:

    • Algo

    Must include:

  7. How to Remove Items From Lists in Python

    Dec 23, 2024 · To remove an item from a list in Python, you can use various approaches like .pop(), del, .remove(), and .clear(). To remove items from a certain position in a list, you use …

    Missing:

    • Algo

    Must include:

  8. Removing Elements from a List in Python - CodeRivers

    Jan 20, 2025 · Often, during data manipulation or algorithm implementation, you need to remove elements from a list. This blog post will explore various ways to remove elements from a list in …

  9. python - deleting entries in a dictionary based on a condition

    If you need to change the original dictionary in place, you can use a for -loop: if v[0] > 30: del data[k] Note that list(data.items()) creates a shallow copy of the items of the dictionary, i.e. a …

    Missing:

    • Algo

    Must include:

  10. Remove Items from a List While Iterating - Python

    Dec 3, 2024 · When we need to remove items from a list while iterating, we have several options. If we need to remove specific values, using a for loop with remove() can work, but it’s …