Return to Snippet

Revision: 26927
at May 17, 2010 06:30 by magicrebirth


Initial Code
dict(a=1, b=2, c=3)
returns {'a': 1, 'b': 2, 'c': 3}

Initial URL


Initial Description
Any keyword arguments you pass to the dict constructor are added to the newly created dictionary before returning. Of course, you are limited to the keys that can be made into keyword arguments: valid Python variable names.

Initial Title
Creating Dictionaries

Initial Tags


Initial Language
Python