In python, I know how to remove items from a list.
item_list = [\'item\', 5, \'foo\', 3.14, True] item_list.remove(\'item\') item_list.remove(5)
You Can use this -
Suppose we have a list, l = [1,2,3,4,5]
l = [1,2,3,4,5]
We want to delete last two items in a single statement
del l[3:]
We have output:
l = [1,2,3]
Keep it Simple