Created
January 8, 2017 06:01
-
-
Save mlongval/9fbe1e16b97be6e16ce0675b7291da94 to your computer and use it in GitHub Desktop.
Practice Python 05 march 2014
This file contains 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
def overlap(): | |
import random | |
listA = random.sample(range(100), k=10) | |
listB = random.sample(range(100), k=12) | |
listC = list(set([x for x in listA if x in listB])) | |
listC.sort() | |
return listC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment