Answers for "how to remove a variable from a list in python"

12

python how to remove item from list

list.remove(item)
Posted by: Guest on April-12-2020
0

how to remove item from list in python

nums = [1, 2, 3, 4, 5, 6]
del(nums[5])
print(nums) # Output will be [1, 2, 3, 4, 5]
Posted by: Guest on September-08-2021

Code answers related to "how to remove a variable from a list in python"

Python Answers by Framework

Browse Popular Code Answers by Language