Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Collections (2016, retired 2019) Dictionaries Dict Basics

quiz question 2 0f 7

i think answer should be 1

1 Answer

No ... it should be 3 test_dict = {"a": 1, "b": 2, "a": 3}

think of it this way

y = 1 z = 2 y= 3

the third time I re-assigned y.

The dic example is sort of similar logic.

a has value of 1 b has value of 2 a has value of 3.