loading
open in
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Python not 'in' operator
a = 17
b = 50

myArray = [10, 20, 30, 40, 50 ]; 
  
if ( a not in myArray ):
   print(a, 'is not in the list')
else: 
   print(a, 'is in the list')


if ( b in myArray ): 
   print(b, 'is in the list')
else: 
   print(b, 'is not in the list')

# 17 is not in the list
# 50 is in the list