Skip to content

Instantly share code, notes, and snippets.

@ilhamije
Created April 26, 2020 03:24
Show Gist options
  • Save ilhamije/01afd219f4419c7e15b3bc07c69df47b to your computer and use it in GitHub Desktop.
Save ilhamije/01afd219f4419c7e15b3bc07c69df47b to your computer and use it in GitHub Desktop.
JDS-ilham-DE-Python-1
def unique_names(names1, names2):
names1_set = set(names1)
names2_set = set(names2)
return list(names1_set.union(names2_set))
names1 = ["Ava", "Emma", "Olivia"]
names2 = ["Olivia", "Sophia", "Emma"]
print(unique_names(names1, names2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment