Tuple stores multiple data in the same variable. Tuples work the same as lists but in the case of the tuple they are immutable, you can not modify the values once defined.
In the list, we use square brackets but in tuples, we use round brackets.
Example 2: Modifying values
numbers=(10,20,30,40,50) numbers=10 print(numbers)
Output Error: TypeError: ‘tuple’ object does not support item assignment
Support us by sharing this post