Skip to content
  • Tutorials
    • c programming
      • libraries
    • c++
    • Linux
    • Python
    • batch programming
    • Technology
  • IDE
  • Tools
how to remove an item from a certain index in python 1

how to remove an item from a certain index in python

June 17, 2022 by Anurag batra
arr = [0, 1, 2, 3, 4]
del arr[1]
# arr is now equal to [0, 2, 3, 4]

Here is what the above code is Doing:
1. We create an array called arr.
2. We delete the element at index 1.
3. We print the array.
4. We print the length of the array.

Categories Python Examples
Post navigation
python program to find all prime numbers within a given range
sql alchemy engine all tables
© MyEduKit - 2022 . All Rights Reserved.