Anonymous user
Copy a string: Difference between revisions
Actually copying a string
(Show how all copy operations return the same string) |
(Actually copying a string) |
||
Line 197:
>>> src is a is b is c is d
True
</pre>
To actually copy a string:
<pre>
>>> a = 'hello'
>>> b = ''.join(a)
>>> a == b
True
>>> b is a
False
</pre>
|