Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Raj39120/0dee52469f00b58aff5eb48968cdd864 to your computer and use it in GitHub Desktop.
Save Raj39120/0dee52469f00b58aff5eb48968cdd864 to your computer and use it in GitHub Desktop.
import random
from random import randrange
a = []
for i in range(0, randrange(1, 20)):
n = random.randint(1, 100)
a.append(n)
b = []
for i in range(0, randrange(1, 20)):
n = random.randint(1, 100)
b.append(n)
print(a)
print(b)
my_list = []
for i in a and b:
if i in a and b:
my_list.append(i)
if i in my_list:
break
if i not in a and b:
pass
print my_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment