python is not in method code example Example: is not in python li = [1,2,'a','b'] if 'hello' not in li: print('hello is not in the list')