a = ['name','phone','email','birth'] ,
b = ['name','phone','birth']
I want to get it returned as True/False if a
value is included in b
as in
operator.
list(map(lambdax,y:x in y,a,b)
I tried to see one by one, but only three b
were shown.
Is there only a way to check a
one by one using for
statement?
Please keep that in mind.
a = ['name','phone','email','birth']
b = ['name','phone','birth']
[i in b for i in a]
[True, True, False, True]
Please keep that in mind
a = ['name','phone','email','birth']
b = ['name','phone','birth']
c = ['aaaa','phone','birth', 'email']
import itertools as it
list(map(lambda t:len(set(t)) == 1, it.zip_longest(a, b, c)))
[False, True, False, False]
© 2025 OneMinuteCode. All rights reserved.