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

0

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

color = ['Red', 'Green', 'White', 'Black', 'Pink', 'Yellow']
color = [x for (i,x) in enumerate(color) if i not in (0,4,5)]
print(color)
Posted by: Guest on April-02-2021
0

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

color = ['Red', 'Green', 'White', 'Black', 'Pink', 'Yellow']

color = [x for (i,x) in enumerate(color) if i not in (0,4,5)]

print(color)
Posted by: Guest on July-22-2021

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

Python Answers by Framework

Browse Popular Code Answers by Language