On Thu, Feb 5, 2009 at 5:59 PM, wrote:
> "S.Selvam Siva" wrote:
> > I tried to do a string replace as follows,
> >
> > >>> s="hi & people"
> > >>> s.replace("&","\&")
> > 'hi \\& people'
> > >>>
> >
> > but i was expecting 'hi \& people'.I dont know ,what is something
> different
> > here with e
"S.Selvam Siva" wrote:
> I tried to do a string replace as follows,
>
> >>> s="hi & people"
> >>> s.replace("&","\&")
> 'hi \\& people'
> >>>
>
> but i was expecting 'hi \& people'.I dont know ,what is something different
> here with escape sequence.
You are running into the difference between
On Thu, Feb 5, 2009 at 3:40 AM, S.Selvam Siva wrote:
> Hi all,
>
> I tried to do a string replace as follows,
>
s="hi & people"
s.replace("&","\&")
> 'hi \\& people'
>
> but i was expecting 'hi \& people'.I dont know ,what is something different
> here with escape sequence.
The Pyt
Hi all,
I tried to do a string replace as follows,
>>> s="hi & people"
>>> s.replace("&","\&")
'hi \\& people'
>>>
but i was expecting 'hi \& people'.I dont know ,what is something different
here with escape sequence.
--
Yours,
S.Selvam
--
http://mail.python.org/mailman/listinfo/python-list