Advertisement
Guest User

Untitled

a guest
Aug 28th, 2014
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. def main():
  2. words_list = ["hello", "hi", "hello", "goodbye", "goodbye", "hey", "hi"]
  3. unique_list = eliminate_duplicates(words_list)
  4. print(unique_list)
  5.  
  6. def eliminate_duplicates(words_list):
  7. unique_list = []
  8. for word in words_list:
  9. if word not in unique_list:
  10. unique_list = unique_list + [word]
  11. return unique_list
  12. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement