asked 232k views
5 votes
In a Python dictionary, an association is formed between what two components of the dictionary?

asked
User Khelll
by
8.0k points

1 Answer

4 votes

Answer:

Yes, an association is formed between key and its value.

Step-by-step explanation:

A dictionary in python is an unordered data structure where 2 elements are entered for each entry - a key and its value. Unlike list, we have to give the index through which we want to access that value. This is more flexible than lists as in lists index can be of int type only but in dictionary key can be of any datatype. For example :

dict = { "apple: 1 , "banana" : 2 }

Every element need not be of same type, they can differ too.

answered
User Feng Tian
by
7.0k points

No related questions found