Creation and use of dictionaries in Python

--Originally published at Py(t)hon

This is the last post of the mastery topics, so let’s give everything to it. Dictionaries, they are just another type of data just like lists and tuples. They are indexed by keys, which can be any immutable type, or tuples if they don’t contain any mutable object.

You can create them with: {}, there is also a function dict() inside you put all the elements that you want inside the dictionary.Here is an example of a dictionary:

tel = {'jack': 4098, 'sape': 4139}

Here is a cool video:

That’s all of the semester, i have completed my mastery topics #PUG#Tec#TC101#TheEnd#Dictionaries