This function creates a new dictionary from its arguments. The general form is:
dict(v,k0=v0,k1=v1, ...)
That is, there may be one optional positional argument or any number of keyword arguments.
If you supply no arguments, you get a new, empty dictionary.
If one positional argument is supplied, it must be a iterable containing two-element iterables. Each two-element iterable becomes one key-value pair of the result.
>>> dict()
{}
>>> dict ( [ (0, 'stop'), (1, 'go') ] )
{0: 'stop', 1: 'go'}
>>> dict((('y', 'boy'), ('x', 'girl')))
{'y': 'boy', 'x': 'girl'}
If you supply any keyword arguments, each keyword becomes a key in the resulting dictionary, and that argument's value becomes the corresponding value of that key-value pair.
>>> dict(bricks='sleep', keith='maniac', rj='gumby')
{'bricks': 'sleep', 'keith': 'maniac', 'rj': 'gumby'}