Python Programming - Tuples - Discussion

Discussion Forum : Tuples - General Questions (Q.No. 26)
26.
How can you create a shallow copy of a tuple?
new_tuple = old_tuple.copy()
new_tuple = old_tuple.clone()
new_tuple = copy(old_tuple)
new_tuple = old_tuple[:]
Answer: Option
Explanation:
The slicing technique [:] creates a shallow copy of the tuple.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.