Run
fruits = ['apple', 'banana', 'cherry', 'mango'] x = 'guava' if x not in fruits: print(f'{x} is not in the given list.') else: print(f'{x} is in the given list.')
Output