import random
I/P:
l1 = list(range(5))
random.shuffle(l1)
l2 = list(range(10))
random.shuffle(l2)
count = 0
for i in l1:
for j in l2:
if i == j:
print(i)
count +=1
print("Common numbers are as following: ", count)
-------------------------------------------------
O/P:
0
4
3
1
2
Common numbers are as following: 5
-------------------------------------------------
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.