Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/usr/env python
- import random
- #a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
- #b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
- a=[random.randrange(0,50,1) for i in range(0,51,1)]
- b=[random.randrange(0,50,1) for i in range(0,51,1)]
- #Converting a List into a Set, to remove duplicates
- seta=set(a)
- setb=set(b)
- c=seta.intersection(setb)
- print(c)
Add Comment
Please, Sign In to add comment