Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- a = []
- b = []
- c = []
- def random_list(list_c):
- for x in range(random.randint(10, 50)):
- list_c.append(random.randint(1, 100))
- random_list(a)
- random_list(b)
- for element in a:
- if element in b:
- c.append(element)
- print(f' List A : {a}')
- print(f' List B : {b}')
- print(f' Values on both lists : {c}')
Add Comment
Please, Sign In to add comment