class dict(**kwarg)
class dict(mapping, **kwarg)
class dict(iterable, **kwarg)
The dict function creates a new dictionary. If no arguments are included, an empty dictionary will be created. If an argument is included and this is an object of type "mapping", an empty dictionary will be created with the same key-value pairs as the mapping object. In any other case, the argument must be an iterable object, and each element of the object must, in turn, be an iterable object with exactly two objects. The first object will become a key in the new dictionary, and the second object will become the corresponding value. If a key appears more than once, only the last occurrence will be included in the dictionary.
If no arguments are included, an empty dictionary is created:
If an iterable object is added, it must be made up of iterable objects containing two objects, which will be considered keys and values of the new dictionary:
Below are several ways to create the same dictionary from different objects: