[Tutor] string editing

Alan Gauld alan.gauld at btinternet.com
Sat Jul 31 11:27:51 CEST 2010


"ANKUR AGGARWAL" <coolankur2006 at gmail.com> wrote

> hey although i knw string are mutable but i want to know if there is 
> anyway
> to add in the string.

Although strings are immutable there are numerous ways to create a new
variation on a string. For your purposes the replace() method is 
probably
best but if you do

>>> help(str)

you can read about all the options.

You might also find the Handling Text topic of my tutorial helpful.

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/





More information about the Tutor mailing list