Skip to content

Instantly share code, notes, and snippets.

@libert-xyz
Created January 7, 2016 19:28
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 libert-xyz/1111b4a5964b0256ad3a to your computer and use it in GitHub Desktop.
Save libert-xyz/1111b4a5964b0256ad3a to your computer and use it in GitHub Desktop.
##Libert R Schmidt
##rschmidt@libert.xyz
##List Overlap Comprehensions http://www.practicepython.org/exercise/2014/04/10/10-list-overlap-comprehensions.html
import random
a = random.sample(range(1,50),10)
b = random.sample(range(1,50),10)
common = [i for i in a if i in b]
print(common)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment