You and a friend both collect animal stickers; mine and friend are what each of you has (with repeats). Write sticker_swap(mine, friend) to return (can_get, can_give): can_get is what the friend has and you don't, can_give is what you have and the friend doesn't, both as alphabetical lists.
sticker_swap(["cat", "dog", "dog"], ["dog", "fox"])→(['fox'], ['cat'])sticker_swap([], ["owl"])→(['owl'], [])def sticker_swap(mine, friend):
mine_set = set(mine)
friend_set = set(friend)
# your code here: what the friend has and you don't, sorted, into can_get
can_get = []
# your code here: what you have and the friend doesn't, sorted, into can_give
can_give = []
return (can_get, can_give)
Run tries the examples. When they look right, Submit.