Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string_1, string_2 = input().split(", "), input().split(", ")
- print(sorted(set([str_1 for str_1 in string_1 for str_2 in string_2 if str_1 in str_2]), key=string_1.index))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement