Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 1 2 3 4 5 7
- # 1 2 4 4 5 6
- lst1 = input().split()
- lst2 = input().split()
- while len(lst1) != len(lst2):
- if len(lst1) > len(lst2):
- lst2.append('x')
- elif len(lst2) > len(lst1):
- lst1.append('x')
- for i in range(len(lst1)):
- for j in range(len(lst2)):
- if lst1[i] == lst2[j]:
- print('+', lst1[i], lst2[j])
- lst2.remove(lst2[j])
- break
- else:
- print('-', lst1[i], lst2[j])
- lst2.remove(lst2[j])
- break
Advertisement
Add Comment
Please, Sign In to add comment