programming-examples/python/List/Python program to print a specified list after removing the 0th, 2nd, 4th and 5th elements.py
2019-11-15 12:59:38 +01:00

3 lines
143 B
Python

color = ['Red', 'Green', 'White', 'Black', 'Pink', 'Yellow']
color = [x for (i,x) in enumerate(color) if i not in (0,4,5)]
print(color)