Dictionaries are similar to list. They can store many values that can be used when called. The difference between a dictionary and a list is that every value stored in a dictionary as mapped to another value.

       For creating a dictionary we use the function dict( ). For stating that something is dictionary we type the name we want to assign to it followed by the equal sign. After the equal signs, you start typing the values between curly brackets. For writing a value it is necessary to type the value, a colon, and the value it is being mapped to. For separating each set of values we use commas.

       As you can see, when you try to print a dictionary, the values inside of it are printed without an specific order. For example, if you print them again, the order will be completely different:

       We can determine the number of sets of values inside a dictionary with the command len( ).



     Also, you can get the value is being mapped to another value. Also, you can change the value it is being mapped to:

CC BY 4.0 Dictionaries by Frida Diaz is licensed under a Creative Commons Attribution 4.0 International License.