Created
April 4, 2019 22:21
-
-
Save MustafaAnasKH99/a4e736d848d6c8850b6c87a72f374931 to your computer and use it in GitHub Desktop.
Unite Unique numbers in array - Mustafa Anas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Challenge Solved in Python - Mustafa Anas | |
def unite_unique(*args): | |
united_lists = [] | |
unique_list = [] | |
for i in args: | |
united_lists += i | |
for i in united_lists: | |
if unique_list.count(i) == 0: | |
unique_list.append(i) | |
#Test Me: | |
unite_unique([1, 3, 2], [5, 2, 1, 4], [2, 1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment