0
Python
Finding common elements in them
4 Answers
+ 10
Ajith , you can use print statement like this, it uses unpack operator "*"
print(*set(list_1) & set(list_2))
0
list_1=input().split()
list_2=input().split()
print(set(list_1) & set(list_2))
For example list_1= a b c d
list_2=c d e f
Output is {'c' ,'d'}
I want in this format output
c d
0
What changes should b made help me wizards
0
Thank you lothar



