Anonymous user
Shakespeare: Difference between revisions
→Dictionaries
imported>Ynasser |
imported>Ynasser |
||
Line 125:
====Dictionaries====
* Dictionaries are another data structure commonly used in programming. Dictionaries store what we call <b> key-value pairs</b> (kind of like dictionaries in real life). One common thing to do with dictionary is determine an entry's value given its key.
* Entries in the dictionary are stored <b>
* <b>keys</b> for each entry in the dictionary must be unique, <b> values </b> do not have to be unique.
* For our simplicity, we will use a string as keys.
|