Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- word_dict = {'show': ['display', 'exhibit', 'convey', 'communicate', 'manifest', 'disclose'],
- 'slow': ['unhurried', 'gradual', 'leisurely', 'late', 'behind', 'tedious', 'slack'],
- 'dangerous': ['perilous', 'hazardous', 'uncertain']}
- def main():
- edited_synonyms = remove_word(word_dict)
- print(edited_synonyms) #should print out an edited dictionary
- def remove_word(word_dict):
- dictionary = {}
- synonyms_list = word_dict.values()
- new_list = []
- for i in synonyms_list:
- new_list.append(i)
- for word in new_list:
- letter_length = len(word)
- if letter_length <= 7:
- new_list.pop(new_list.index(word))
- return dictionary
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement