Membership ( in, not in ) : Member in « List « Python Tutorial






mixup_list = [4.0, [1, 'x'], 'beef', (-1.9+6j)]
print 'beef' in mixup_list
print 'x' in mixup_list
print 'x' in mixup_list[1]

num_list = [1,2,3]
print -49 in num_list
print 34 in num_list
print [65535L, 2e+030, (76.45-1.3j)] in num_list








7.18.Member in
7.18.1.Check a user name and PIN code
7.18.2.All items
7.18.3.For each item in a list
7.18.4.Membership ( in, not in )