On 31/07/2010 08:50, ANKUR AGGARWAL wrote:
hey although i knw string are mutable but i want to know if there is anyway
^^^ immutable!
to add in the string.
like i m wrking on the tool and want to run the input from the user in the
terminal
like user makes input "this is ankur"
and i want it like "this\ is\ ankur" ???????
is it possible??
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
>>> ankur = "this is ankur"
>>> ankur.replace(' ', '\ ')
'this\\ is\\ ankur'
HTH.
Mark Lawrence.
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor