0
In python how to write that check a list and create a new list contain existence list item.
Condition is if existence list item contain 2 "a".
1 ответ
+ 1
#This is what u want
a=[1,2,3,4,5]
b=["a", "b",3, "c", "d",1]
for i in b :
if i in a :
print(str(i) + " is common")
#output : 3 is common
1 is common