Q:

Write a Python program to print a specified list after removing the 0th, 4th and 5th elements

-2

 Write a Python program to print a specified list after removing the 0th, 4th and 5th elements.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now