Skip to content

Instantly share code, notes, and snippets.

@mlongval
Created January 8, 2017 06:01
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 mlongval/9fbe1e16b97be6e16ce0675b7291da94 to your computer and use it in GitHub Desktop.
Save mlongval/9fbe1e16b97be6e16ce0675b7291da94 to your computer and use it in GitHub Desktop.
Practice Python 05 march 2014
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