- 1
"dictionaries" explane..
4 Answers
+ 2
In dictionary we store our elements say (1,2,3,4) with a key say {a:1, b:2, c:3, d:4}.
So, the key 'a' is used to access element 1 or it is used to check if element '1' exists in your data structure or not etc.
Try thinking of dictionaries as a 'Colleg ID card:Student' relation.
All the best!
+ 1
similar to list but useing 'key' instead number for indexing
0
thanks friends.
0
key value pair are exists in dictionary. for example
we have a key 'name' and its value is 'sumit' , or like key 'age' and its value 20.
in dictionary you can defined it as
dict = {'name':'sumit','age':20}
you can access the values using keys
dict['age']