Computer Science, asked by malikpurujeet92462, 1 year ago

One similarity and one difference between list and dictionary python

Answers

Answered by shourya2631
1

Answer:

The Key Difference between a List and a Tuple. The main difference between lists and a tuples is the fact that lists are mutable whereas tuples are immutable. A mutable data type means that a python object of this type can be modified.

Answered by adventureisland
1

While lists and tuples are both data structures in Python, Lists are ordered sequences of items, whereas dictionary sets are unordered collections.

The similarity between list and dictionary python :

  • While lists and tuples are both data structures in Python, there are major differences between them, the most noteworthy of which is that lists are mutable while tuples are immutable.
  • The size of a tuple is constant, but the size of a list is flexible.

Difference between list and dictionary python :

  • Lists are ordered sequences of items, whereas dictionary sets are unordered collections.
  • The main difference is that in dictionaries, items are accessed by keys rather than their physical position.

Similar questions