+ 12

PYTHON DICTIONARY

I'll like to know form experienced programmers, how often you use the Python Dictionaries and when

15th Dec 2017, 6:42 AM
Justine Ogaraku
Justine Ogaraku - avatar
9 Answers
+ 5
Whenever needed. Anytime you need something that could be represented as a key-value pair. For example, if you get into using Python with web development you may find yourself using a dictionary along with prepping an object to be converted to JSON.
15th Dec 2017, 7:00 AM
ChaoticDawg
ChaoticDawg - avatar
+ 15
may it helpful.. https://docs.python.org/3/tutorial/datastructures.html
15th Dec 2017, 10:17 AM
KäzÎ MrÎdÚl HøssäÎn
KäzÎ MrÎdÚl HøssäÎn - avatar
+ 9
Thanks guys
15th Dec 2017, 4:54 PM
Justine Ogaraku
Justine Ogaraku - avatar
+ 9
Dictionaries give us O(1) average lookup times. So they are an important component in many different optimization strategies.
25th Dec 2017, 1:03 PM
Eric Blinkidu
Eric Blinkidu - avatar
+ 4
Also, the switch... Case doesn't exist in python. What is often use instead is a dictionary whose key are the condition and values are functions realizing the statement. This is a very useful way of using dictionaries
15th Dec 2017, 7:41 AM
Corentin
Corentin - avatar
+ 2
very useful iterables
15th Dec 2017, 8:31 AM
Zandifier
Zandifier - avatar
+ 1
I once used it to strip a >1000 pages text document (ecported from an oldschool database) from all the regular words to find custom tags.
16th Dec 2017, 10:49 AM
Dennis
Dennis - avatar
+ 1
dictionaries 👇👇👇👇👇👇 https://code.sololearn.com/cuWT75qxQa4o/?ref=app
16th Mar 2020, 12:32 AM
Saurabh Kahar
+ 1
Dictionaries 👇👇👇👇👇👇👇 https://code.sololearn.com/cuWT75qxQa4o/?ref=app
16th Mar 2020, 12:32 AM
Saurabh Kahar