How to Update Tuples : Assign « Tuple « Python Tutorial






aTuple = (123, 'abc', 4.56, ['inner', 'tuple'], 7-9j)

aTuple = aTuple[0], aTuple[1], aTuple[-1]

print aTuple

tup1 = (12, 34.56)

tup2 = ('abc', 'xyz')

tup3 = tup1 + tup2

print tup3








6.2.Assign
6.2.1.How to Create and Assign Tuples
6.2.2.How to Update Tuples
6.2.3.Creation, Repetition, Concatenation
6.2.4.joining their elements together
6.2.5.containing mutable objects that can be changed.
6.2.6.Creating and accessing tuples.
6.2.7.Unpacking sequences.