Run
tuple1 = ('apple', 'banana', 'cherry') search_item = 'apple' is_item_present = False for item in tuple1: if item==search_item: is_item_present = True break if is_item_present: print(f'{search_item} is present in the tuple.') else: print(f'{search_item} is not present in the tuple.')
Output