3 ms·
Give me one example where you would ever want a copy of a tuple rather than another reference to it.
by anewaccountname 18y ago
Give me one example where you would ever want a copy of a tuple rather than another reference to it.
- henryprecheur 18y agoThat wasn't my point. My point was that [:] conserves the type of sequence. Also [:] returns a reference to the existing tuple instead of a copy: >>> a = (1, 2, 3) >>> id(a) 3081276268L >>> id(a[:]) 3081276268L