Created
February 6, 2019 22:49
-
-
Save pdbartsch/b489a06218de6840281351d1e86b46f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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