Built-in Functions
dict()
Create a dictionary of key-value pairs.
dict(**kwargs)
dict() creates a dictionary. You can pass named values, another mapping, or pairs of keys and values.
Parameters
| Name | Description |
|---|---|
| kwargs | Optional named values to use as dictionary keys and values. |
Returns
A new dictionary.
Try it
Run it and change it
scores = dict(ada=10, ben=8) print(scores["ada"])