DEV Community

loading...

Discussion on: Data Structures in Python

Collapse
kingtomi profile image
Ayodabo Oluwatomisin

List are mutable non primitive data Structures while tuple is the opposite, immutable. You make use of list when you will be modifying the contents from time to time, you use tuples when you don't need to modify it after creating it. It places a restriction and helps makes computation faster.

Collapse
global_codess profile image