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!

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 Dictionary Basics

Mikkel Bielefeldt
Mikkel Bielefeldt
3,227 Points


I'm lost, I don't know what happen here, tried a little bit of everything and just can't seem to get. My problem is bitterly I don't what I need to do.

player = {"name": "Mikkel Bielefeldt", "remaining_lives": 3, "levels": = [1, 2, 3, 4,] "items": {"food": "banana", "apple",}}

2 Answers

For levels remove the equals sign and add a comma separator. For items remove apple so you have a key value pair.

player = {"name": "Mikkel Bielefeldt",
          "remaining_lives": 3,
          "levels": [1, 2, 3, 4],
          "items": {"food": "banana"}}