+ 2

I didn't understand why of using dictionary?

10th Apr 2017, 8:25 AM
El mostafa El kaderi Yemlahi
El mostafa El kaderi Yemlahi - avatar
5 Respostas
+ 7
https://code.sololearn.com/cWC450nqBVG2/?ref=app Just see this code , it may help you.
10th Apr 2017, 8:27 AM
Mr.Robot
Mr.Robot - avatar
+ 9
@Mr.Robot How would it help?
10th Apr 2017, 8:35 AM
Dragon Slayer Xavier
Dragon Slayer Xavier - avatar
+ 5
In real word you use them to find a translation or a meaning of a keyword. In Python it works similarly - you "translate" its key (often being a short word, char or number) into value - a string, a number, a list, a dict or even an object. It is way easier to operate on keys when addressing big collections of data. It makes it more accessible.
10th Apr 2017, 8:57 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 2
i dont rly understand dictionaries
18th Apr 2017, 10:38 AM
XOPGAMINGX _300
XOPGAMINGX _300 - avatar
+ 1
I have only used a dictionary in python once. It held keys (letters) and the values (morse code dots) .. when a string was input, it checked each letter againts the dictionary and output the appropriate morse code sequence * I take that back. I used it a second time on a quick contact list I made. When you put in the key (name) it returned the value (phone number
10th Apr 2017, 9:45 AM
LordHill
LordHill - avatar