Q. Why is dictionary termed as an unordered collection of objects?


Answer =

A dictionary is often referred to as an unordered collection of objects because the elements within a dictionary are not arranged in a specific order. In other words, the items in a dictionary do not have an inherent positional index like they do in a list or an array.

Instead of using numerical indices to access elements, a dictionary uses keys to uniquely identify and retrieve values associated with those keys. Each key in a dictionary must be unique, and it serves as a label or identifier for its corresponding value. The keys are used as a hash, allowing for efficient retrieval of values.

9 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. Why is dictionary termed as an unordered collection of objects?

    Answer =

    Dictionary term as an unordered collection of object because in dictionary we can use any type of data types . but in key datatype should be immutable type.

    ReplyDelete
  2. Man above took the credit

    ReplyDelete
  3. Papa don vaibhav hai

    ReplyDelete
  4. Why is dictionary termed as an unordered collection of objects?

    Answer =

    Dictionary term as an unordered collection of object because in dictionary we can use any type of data types . but in key datatype should be immutable type.

    ReplyDelete
  5. thank you sir by jaswanth 11 b

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post