Computer Science, asked by rockerpommathi, 4 months ago

How are Tuples different from Lists when both are sequences? ​

Answers

Answered by Mariya7972
12

We can conclude that although both lists and tuples are data structures in Python, there are remarkable differences between the two, with the main difference being that lists are mutable while tuples are immutable. A list has a variable size while a tuple has a fixed size.

Answered by monica789412
1

Tuples and Lists are the part of Python language but they are different to each other in many ways.

Some main points of difference between two are:

  • Lists are used to store variables having different values but with same data type whereas Tuples are used to store variables having different values with different data type.
  • Lists are active in nature but tuples are steady in nature.
  • The iteration process in lists are slow whereas in tuples it is quite faster in comparison.
  • Lists are more prone to errors as compared to tuples.
  • Lists also consume more storage space in comparison to tuples.
Similar questions