A dictionary is a collection of many values that are ordered,changeable and do not allow duplicates.
Enter the following into interactive shell to get a look of how a dictionary works:
>>> epl = {'chelsea':'south-London','Arsenal':'North-London','Liverpool':'maryside'}
you can acces values through their keys:
>>> epl['chelsea']
'south-London'
>>>
Inclusion dictionaries uses keys and associated with key-value pair to access the position of a certain key-value unlike indexes in lists , also in code dictionaries are type with curly braces.
Top comments (0)