Answers for "how to remove list item in python"

1

how to delete an item from a list python

myList = ['Item', 'Item', 'Delete Me!', 'Item']

myList.pop(2) # myList now equals ['Item', 'Item', 'Item']
Posted by: Guest on November-17-2019
0

how delete element from list python

myList = ["Bran", 11, 33,"Stark"] 
del myList[2] # output:  [‘Bran’, 11, ‘Stark’]
Posted by: Guest on November-05-2021

Code answers related to "how to remove list item in python"

Python Answers by Framework

Browse Popular Code Answers by Language