Question: Concatenating the tuple ( 4 0 , 5 0 ) to tuple 1 from Part ( b ) , as in tuple 1 + =
Concatenating the tuple to tuple from Part b as in
tuple
creates a new tuple, then assigns a reference to it to the variable tupletuple still refers to the original tuple.
In the following snippets, after the two assignments, tuple and tuple are two different copies of the same tuple object:
In : tuple
In : tuple tuple
In : tuple
Out:
The augmented assignment statement can be used with strings and tuples, even though they're immutable.
For a string or tuple, the item to the right of must be a string or tuple, respectivelymixing types causes a TypeError.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
