Skip to content

Instantly share code, notes, and snippets.

@KHerb
Last active June 17, 2016 14:37
Show Gist options
  • Save KHerb/3d83ad8b7b855b3c0fc129d05b4a9ef3 to your computer and use it in GitHub Desktop.
Save KHerb/3d83ad8b7b855b3c0fc129d05b4a9ef3 to your computer and use it in GitHub Desktop.
prime = "prime.txt"
happy = "happy.txt"
pin = open(prime,'r')
pnumber = [p.strip() for p in pin.readlines()]
pin.close()
hin = open(happy, 'r')
hnumber = [h.strip() for h in hin.readlines()]
hin.close()
overlap = []
for p in pnumber:
if p in hnumber:
overlap.append(p)
print "Here are the overlapping numbers -> " ,overlap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment