Created
January 30, 2017 23:06
-
-
Save Ra1d7/e2471be90b1d77028f62c8de2901773c to your computer and use it in GitHub Desktop.
compare two lists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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