How can you copy (clone) a string?

gilles civario gilles.civario at c-s.fr
Tue Oct 3 11:01:41 EDT 2000


Juste an idea :

Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> a = "bigstring"
>>> b=a+"smallone"
>>> c=a+"smallone"
>>> a
'bigstring'
>>> b
'bigstringsmallone'
>>> c
'bigstringsmallone'
>>> id(c)
8738144
>>> id(b)
8728896
>>> id(a)
8727520
>>> 


regards.

Gilles.



More information about the Python-list mailing list