Q:

Write a Python program to check whether all items of a list is equal to a given string

0

Write a Python program to check whether all items of a list is equal to a given string

All Answers

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

color1 = ["green", "orange", "black", "white"]
color2 = ["green", "green", "green", "green"]

print(all(c == 'blue' for c in color1))
print(all(c == 'green' for c in color2))

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