Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. word_dict = {'show': ['display', 'exhibit', 'convey', 'communicate', 'manifest', 'disclose'],
  2. 'slow': ['unhurried', 'gradual', 'leisurely', 'late', 'behind', 'tedious', 'slack'],
  3. 'dangerous': ['perilous', 'hazardous', 'uncertain']}
  4.  
  5. def main():
  6. edited_synonyms = remove_word(word_dict)
  7. print(edited_synonyms) #should print out an edited dictionary
  8.  
  9. def remove_word(word_dict):
  10. dictionary = {}
  11.  
  12. synonyms_list = word_dict.values()
  13. new_list = []
  14. for i in synonyms_list:
  15. new_list.append(i)
  16.  
  17. for word in new_list:
  18. letter_length = len(word)
  19. if letter_length <= 7:
  20. new_list.pop(new_list.index(word))
  21.  
  22. return dictionary
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement