array = [1, 8, 15]
g = (x for x in array if array.count(x) > 0)
array = [2, 8, 22]
print(list(g))
[1]
[1, 8, 15]
[8]
[22]
(x for x in "123456789")
[x for x in "123456789"]
all()
max()
map()
any()
a = ('inf')
array = [1, 8, 15]
g = (x for x in array if array.count(x) > 0)
array = [2, 8, 22]
print(list(g))
[1]
[1, 8, 15]
[8]
[22]
(x for x in "123456789")
[x for x in "123456789"]
all()
max()
map()
any()
a = ('inf')