I have one list and I want to print out all elements of it but skip one specific.
a = [1,2,3,4,5,6,7,8,9]
I want to print out:
1,3
If you specify the element to be skipped by its position (index):
for position, element in enumerate(a): if position != specified_position: print(element)
If you specify the element to be skipped by its value:
for element in a: if element != specified_value: print(element)