Skip to content

Instantly share code, notes, and snippets.

@pdbartsch
Created February 6, 2019 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdbartsch/b489a06218de6840281351d1e86b46f2 to your computer and use it in GitHub Desktop.
Save pdbartsch/b489a06218de6840281351d1e86b46f2 to your computer and use it in GitHub Desktop.
# https://www.practicepython.org/exercise/2014/03/05/05-list-overlap.html
import random
a = random.sample(range(1, 100), 10)
b = random.sample(range(1, 100), 10)
c = list(set(a).intersection(b))
print('a:', a, '\nb:', b, '\noverlap:',c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment