About 984,000 results
Open links in new tab
  1. Python: Replace Item in List (6 Different Ways) - datagy

    Oct 19, 2021 · Learn how to replace an item or items in a Python list, including how to replace at an index, replacing values, replacing multiple values.

  2. How to Replace Values in a List in Python? - GeeksforGeeks

    Jul 23, 2025 · Replacing values in a list in Python can be done by accessing specific indexes and using loops. In this article, we are going to see how to replace the value in a List using Python.

  3. python - Finding and replacing elements in a list - Stack Overflow

    I have to search through a list and replace all occurrences of one element with another. So far my attempts in code are getting me nowhere, what is the best way to do this?

  4. Python - Change List Items - W3Schools

    To change the value of items within a specific range, define a list with the new values, and refer to the range of index numbers where you want to insert the new values:

  5. How to Replace Values in a List Using Python?

    Mar 5, 2025 · Learn how to replace values in a list using Python with methods like indexing, list comprehension, and `map ()`. This guide includes step-by-step examples.

  6. Python: Replacing/Updating Elements in a List (with Examples)

    Jun 6, 2023 · If you want to update or replace multiple elements in a list based on a condition or a function, you can use list comprehension to create a new list with the updated or replaced …

  7. Python List Replacement: A Comprehensive Guide - CodeRivers

    Apr 6, 2025 · Often, you may need to modify the elements within a list, and the process of replacing elements is a common operation. Understanding how to effectively replace elements …

  8. Python Replace Values in List With Examples - Spark By Examples

    May 30, 2024 · You can replace an item in a list by assigning a new value to the specific index position in the list. In this article, I will explain different ways to replace a list in Python with …

  9. How to Replace an Element in a List in Python - Tutorial Kart

    To replace an element in a Python list, you can directly assign a new value to the specific index of the element you want to change. Lists in Python are mutable, allowing modifications through …

  10. How to Replace Values in a List in Python? - Analytics Vidhya

    Apr 23, 2025 · In this article, you will learn how to replace an element in a list in Python, including various methods to replace an item in a list and practical examples for better understanding.