Python Dictionary
Python Dictionary
.
GROUP – XII
GROUP MEMBERS ARE:
The items are separated by commas, and the whole thing is enclosed
in curly braces { }.
An empty dictionary without any items is written with just two curly
braces, like this { }.
The values of a dictionary can be of any type, but the keys must be an
mutable data type such as strings, numbers, or tuples.
Accessing values in dictionary:
To access dictionary elements, we use square brackets [ ] along
with the key to obtain its value.
for example,