+ 2
I didn't understand why of using dictionary?
5 Respostas
+ 7
https://code.sololearn.com/cWC450nqBVG2/?ref=app
Just see this code , it may help you.
+ 9
@Mr.Robot How would it help?
+ 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.
+ 2
i dont rly understand dictionaries
+ 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