ShriRam Changed status to publish August 18, 2023
def check_in_tuples(colors, c):
result = any(c in tu for tu in colors)
return result
colors = ((‘Red’, ‘White’, ‘Blue’), (‘Green’, ‘Pink’, ‘Purple’),(‘Orange’, ‘Yellow’, ‘Lime’))
print(“Original list:”,colors)
c1 = ‘White’
print(“\nCheck if”,c1,”presenet in said tuple of tuples!”)
print(check_in_tuples(colors, c1))
c1 = ‘Olive’
print(“\nCheck if”,c1,”presenet in said tuple of tuples!”)
print(check_in_tuples(colors, c1))
ShriRam Changed status to publish August 18, 2023