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