Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fin = open('input.txt', 'r', encoding='utf-8')
- fout = open('output.txt', 'w', encoding='utf-8')
- def intersection(A, B):
- l = [x for x in A if x in B]
- return sorted(l)
- A = set(map(int, fin.readline().split()))
- B = set(map(int, fin.readline().split()))
- print(*intersection(A, B), file=fout)
- fin.close()
- fout.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement