Python Baby Steps 106

Yeaaaaa!!! Half century ! Congratulations you have completed 5 baby steps ! Keep up the good work. In this step, we will check out “dictionary” in python, another type which stores Keys + Values.

Figure 1 : Key Value illustrative image

Till now, you had seen the lists, tuples, sets, where you would access the values by its index. However, Dictionary stores the keys for each value defined by user, and later when you need to access you flash your keys to python and you will get your results. Think of it, as real world dictionary — when you need to browse meaning of a particular word, you scan through that letter first and once you get it, you read the meaning of it, same-to-same in python.

Let’s dive deeper.

Gist for Dictionary

Thank you for your time !

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store