Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- list1 = random.simple(range(1,7))
- list2 = random.simple(range(1,6))
- print("input list1: {}".format(list1))
- print("input list2: {}".format(list2))
- for i in range(1, len(list1)):
- for j in range(1,len(list2)):
- list3 = []
- while i < len(list1) and j < len(list2):
- if list[i] == list[j]
- list3.append(list1)
- j += 1
- else
- i +=1
- print("input list3: {}". format(list3) )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement