Python Baby Steps 106

Mihir Dhakan
Jun 6, 2021

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 !

--

--