How can you copy (clone) a string?
Mike 'Cat' Perkonigg
blablu at gmx.net
Tue Oct 3 10:27:21 EDT 2000
More information about the Python-list mailing list
Tue Oct 3 10:27:21 EDT 2000
- Previous message (by thread): How can you copy (clone) a string?
- Next message (by thread): How can you copy (clone) a string?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
effbot at telia.com (Fredrik Lundh) wrote in <IZlC5.1602$d5.122653 at newsb.telia.net>: >Max Møller Rasmussen wrote: >> Just use slice: >> >> a = 'a' >> b = a[:] > >>>> a = 'a' >>>> b = a[:] >>>> id(a) >7834944 >>>> id(b) >7834944 >>>> a is b >1 > ></F> > > LOL! There seem to be a good optimization :-) Regards, Mike
- Previous message (by thread): How can you copy (clone) a string?
- Next message (by thread): How can you copy (clone) a string?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list