Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- words_list = ["hello", "hi", "hello", "goodbye", "goodbye", "hey", "hi"]
- unique_list = eliminate_duplicates(words_list)
- print(unique_list)
- def eliminate_duplicates(words_list):
- unique_list = []
- for word in words_list:
- if word not in unique_list:
- unique_list = unique_list + [word]
- return unique_list
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement