Dictionaries in python
Dictionaries have keys on one column and values on other column.
one column contain label or character and other column contain integers or float numbers.
In dictionaries, It is defined in '{}' brackets and it contain keys and values separated by ':' .
Dictionary_1 = {"First":1 , "Second":2 , "Third":3 , "Forth": 4, "Fifth":5 }
The other way to represent dictionary as follows
As I have new key and add inside my old dictionary then,
For remove key from dictionary then use this command,
If you forget which keys use in my dictionary then use this command,
and For values,
As List , tuple and Dictionary looks similar but not same.
Post a Comment