SHARE
TWEET

Untitled

a guest Jun 17th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top