If there is a list like this:
lst = [('this', 4, 3), ('that', 9, 3), ('those', 2, 6)]
What every element of this list is?
'this' - is a string
4 - is an integer
And this? ('this', 4, 3)
If there is a list like this:
lst = [('this', 4, 3), ('that', 9, 3), ('those', 2, 6)]
What every element of this list is?
'this' - is a string
4 - is an integer
And this? ('this', 4, 3)
It is a tuple
. A tuple is a sequence of immutable Python objects. Tuples are sequences, just like lists. The differences between tuples and lists are, the tuples cannot be changed unlike lists and tuples use parentheses, whereas lists use square brackets.