Guest User

Untitled

a guest
Jan 11th, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. def checkio(first, second):
  2.     return ','.join(set(first.split(',')).intersection(set(second.split(','))))
  3.  
  4. if __name__ == '__main__':
  5.     assert checkio("hello,world", "hello,earth") == "hello", "Hello"
  6.     assert checkio("one,two,three", "four,five,six") == "", "Too different"
  7.     assert checkio("one,two,three", "four,five,one,two,six,three") == "one,three,two", "1 2 3"
Advertisement
Add Comment
Please, Sign In to add comment