Guest User

Untitled

a guest
Aug 26th, 2019
157
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def unique_names(names1, names2):
  2. return None
  3.  
  4. names1 = ["Ava", "Emma", "Olivia"]
  5. names2 = ["Olivia", "Sophia", "Emma"]
  6. in_first = set(names1)
  7. in_second = set(names2)
  8. in_second_but_not_in_first = in_second - in_first
  9. result = names1 + list(in_second_but_not_in_first)
  10. print(result) # should print Ava, Emma, Olivia, Sophia
RAW Paste Data