If you want to delete every other element in a list in Python, you can do that fairly quickly.

Let us assume that we want to delete elements that are in positions 0, 2, 4, 6, meaning that we are starting from index 0 and we are adding 2 for every next element that we are deleting.

To delete them, we can use the following notation:

 my_list = ["a", "b", "c", "d", "e", "f", "g"]
 ​
 # Delete every other element in the list
 del my_list[::2]  # This is the same as del my_list[0::2]
 ​
 print(my_list)  # ['b', 'd', 'f']

Similarly, if we want to remove elements that are in odd positions, we need to simply start from index 1 and then skip consistent elements:

 my_list = ["a", "b", "c", "d", "e", "f", "g"]
 ​
 # Delete every other element in the list
 del my_list[1::2]
 ​
 print(my_list)  # ['b', 'd', 'f']

That’s basically it. I hope you find this useful.