I\'m working on a script where I have a list of tuples like (\'1\',\'2\',\'3\',\'4\')
. e.g.:
list = [(\'1\',\'2\',\'3\',\'4\'),
(\'2\',\
I was going through some details related to tuple
and list
, and what I understood is:
Heterogeneous
collection data typeSo for appending new item to a tuple, need to cast it to list
, and do append()
operation on it, then again cast it back to tuple.
But personally what I felt about the Question is, if Tuples are supposed to be finite, fixed length items and if we are using those data types in our application logics then there should not be a scenario to appending new items OR updating an item value in it. So instead of list of tuples it should be list of list itself, Am I right on this?