This is KEY!


Traceback (most recent call last):
File "python", line 13, in
TypeError: 'dict' object is not callable

I am not sure what I have done wrong and I can't find the 'dict' that the error message is referring to. Can anyone help?

webster = {
	"Aardvark" : "A star of a popular children's cartoon show.",
    "Baa" : "The sound a goat makes.",
    "Carpet": "Goes on the floor.",
    "Dab": "A small amount."

# Add your code below!
for key in webster:
    print webster("Aardvark", 


The dictionary in question is, webster. However this line is trying to call it like a function...

print webster("Aardvark", "Baa", "Carpet", "Dab")


im also having problems with this, the same error pops up


The purpose of the for loop is the cycle through each item in the dictionary and print one key and value pair on each pass.

for each_key in webster:
    print each_key, webster[each_key]


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.