Skip to content

Instantly share code, notes, and snippets.

@Ra1d7
Created January 30, 2017 23:06
Show Gist options
  • Save Ra1d7/e2471be90b1d77028f62c8de2901773c to your computer and use it in GitHub Desktop.
Save Ra1d7/e2471be90b1d77028f62c8de2901773c to your computer and use it in GitHub Desktop.
compare two lists
import random
lst1 = []
lst2 = []
dups = []
def func(lest):
while len(lest) < 32:
lest.append(random.randint(0,20))
func(lst1)
func(lst2)
for x in lst1:
if x in lst2:
if x not in dups:
print(x)
dups.append(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment