programming-examples/python/List/Python program to print a specified list after removing the 0th, 2nd, 4th and 5th elements.py

3 lines
143 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
color = ['Red', 'Green', 'White', 'Black', 'Pink', 'Yellow']
color = [x for (i,x) in enumerate(color) if i not in (0,4,5)]
print(color)