Skip to content

Instantly share code, notes, and snippets.

@vikychoi
Created November 6, 2017 06:25
Show Gist options
  • Save vikychoi/7b3b918366c81ed292dd68f52a44fa3b to your computer and use it in GitHub Desktop.
Save vikychoi/7b3b918366c81ed292dd68f52a44fa3b to your computer and use it in GitHub Desktop.
import random
a=[]
b=[]
c=[]
for i in range (random.randint(10,20)):
a.append(random.randint(1,100))
for i in range (random.randint(10,20)):
b.append(random.randint(1,100))
for i in a:
if i in b and i not in c:
c.append(i)
c.sort()
print(a,b,c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment