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

Brandon Harrison
Brandon Harrison
1,283 Points

How important are dictionaries in the real world of coding?

So dictionaries are for some reason a really tough part of python for me (incorporating them in loops and such). I wanted to know just how important they are to master in the real world of coding. Also I would like to know if anyone knows of another source i can go to for more about dictionaries

4 Answers

Here is a link you can go to; scroll about 3/4 of the way down and you will find info about dictionaries that might be of help to you. https://docs.python.org/2/tutorial/datastructures.html

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,858 Points

Jeremy has provided some great links for you. I would just like to add an example to kind of give you the scope of their importance.

Go to your profile page and right after the URL in the address bar when you are there (keep the URL intact) add a period and json (.json) and then hit enter.

If you don't have a json reader extension installed in your browser, this will look VERY messy, but this is basically 'your life' here on Treehouse. Every course, every badge, every point. Goes into this mix of Arrays and Dictionaries and Arrays of arrays and Dictionaries of Arrays, etc... This is how Treehouse displays your points and badges and courses.

So... yeah, kind of important.

I also struggled quite a bit with them in the beginning, but just keep working on them and it will eventually produce that Ah-Ha!!! moment. Try a different language. Arrays and Dictionaries are used in many, many languages, and will maybe some minor syntax, they all pretty much function exactly the same way. But, in a different language, you will be exposed to a different perspective and that just may be the Ah-ha!

Keep Coding! :)

:dizzy:

Brandon Harrison
Brandon Harrison
1,283 Points

Thank you very much, I definitely needed to hear that. Looking at the .json made a lot of sense as well. Is there any language in specific that you think would be a good one for more info on dictionaries?

Java's "Dictionary" is called Maps (HashMaps, TreeMaps, etc.) That is what I learned first and it made it easier for me to understand the dictionary in Python.

Brandon Harrison
Brandon Harrison
1,283 Points

Thank you, I will be checking out java very soon then