Tuples n Lists
Let’s observe what Python’s tuples and lists teaches us in real world :)
In python programming language, we learn about tuples and lists as the following:
- Tuples encloses the data items in round brackets and Lists encloses items in square brackets.
- Tuples are immutable and hence cannot be copied whereas Lists are mutable and can be copied.
- There’s a strong culture of tuples being for heterogeneous collection and lists for being homogeneous collection.
- Performing operations on tuples is faster than that of list.
Considering tuples and lists as two different sets of people. We see that Tuples are open to every type of people,
are strict to changes around them, they don’t wanna be imitated and are fast and furious. On the other hand,
Lists are not open to many, usually respond to stimuli around them and improve themselves, can be followed from down,
and are slow and steady.
On comparing we observe that some might like to be among the tuples and some like lists. But the harsh and supple truth is that both type of people are required to exist and one must be like both of them. If one hand is Tuple and other hand is list, then its amust to observe and accept wholeheartedly that both hands are required to clap because one is incomplete without other.