Why is everthing printed 4 times?


#1

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 Aardvark in webster:
print webster["Aardvark"]
for Baa in webster:
print webster["Baa"]
for Carpet in webster:
print webster["Carpet"]
for Dab in webster:
print webster["Dab"]


#2

@anusan1293: Instead of actually iterating through the dictionary and printing out the values, one by one without repeating, you're just accessing position, for example, "Aardvark" and printing the value on it.
Instead of using double quotes on the Aardvark, remove it and try again.

You'll notice that Aardvark used on print webster[Aardvardk] will print each of the values from your dictionary, other than just Aardvark.

Also, there's no need to use four for loop instructions, just use one.