dictionaries may be created using the factory function dict(). : Convert to Dictionary « Dictionary « Python Tutorial






fdict = dict((['x', 1], ['y', 2]))
print fdict








8.5.Convert to Dictionary
8.5.1.use the dict function to construct dictionaries from (key, value) pairs
8.5.2.dict can be used with keyword arguments
8.5.3.dictionaries may be created using the factory function dict().
8.5.4.Mapping Type Related Functions with dict()