Q. How are dictionaries different from lists?
Answer :-
The dictionary is similar. lists in the sense that it is also a collection of data-items just like lists BUT it is different from lists in the sense that lists are sequential collections (ordered) and dictionaries are non-sequential collections (unordered).
In lists, where there is an order associated with the data-items because they act as storage units for other objects or variables you've created, Dictionaries are different from lists and tuples because the group of objects they hold aren't in any particular order, but rather each object has its own unique name, commonly known as a key.
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )