Q. What are the differences between strings and dictionary?


Answer:-

The dictionary is similar to string in the sense that it is also a collection of data-items just like string BUT it is different from string in the sense that string are sequential collections (ordered) and dictionaries are non-sequential collections (unordered).

In string, 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 string, 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 : )

Previous Post Next Post