"dictionaries" explane.. | SoloLearn: Learn to code for FREE!


"dictionaries" explane..

9/1/2016 3:57:00 PM


4 Answers

New Answer


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!


similar to list but useing 'key' instead number for indexing


thanks friends.


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']