Answers for "how to remove elements from a list in pythohn"

0

remove list from list python

>>> a = range(1, 10)
>>> [x for x in a if x not in [2, 3, 7]]
[1, 4, 5, 6, 8, 9]
Posted by: Guest on August-09-2021

Code answers related to "how to remove elements from a list in pythohn"

Python Answers by Framework

Browse Popular Code Answers by Language