Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

are tuples mutable

# Trying to change their values results in an error.
tup = (10, "20", 20, 30, "Thirty-five", 50)
tup[0] = 1# Trying to change the first value of the tuple to 1. This raises an error.
# Tuple object does not support assigment.
 
PREVIOUS NEXT
Tagged: #tuples #mutable
ADD COMMENT
Topic
Name
5+9 =