Guest User

Untitled

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