about | help | code help+videos | done | prefs |
categorize
You are given a list of words, each with a 3 letter animal prefix. The rest of the word is the suffix. Process all of the words, adding each new prefix to a dictionary with a list of all suffixes found for that prefix.
categorize(['yaktreat', 'yakbread', 'yakfood']) → [{'yak': ['treat', 'bread', 'food']}] categorize(['yakfood', 'catfood', 'dogfood']) → [{'yak': ['food'], 'cat': ['food'], 'dog': ['food']}] categorize(['ramsalad', 'yaktreat', 'yakbread']) → [{'yak': ['treat', 'bread'], 'ram': ['salad']}] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy