Re: find and remove \ character from string

2007-09-15 Thread Stefan Behnel
Konstantinos Pachopoulos wrote: i have the following string s and the following code, which doesn't successfully remove the \, but sucessfully removes the \\. s=Sad\\asd\asd newS= for i in s: ... if i!=\\: ... newS=newS+i I'm not quite sure what you're trying to achieve,

Re: find and remove \ character from string

2007-09-15 Thread Steve Holden
Konstantinos Pachopoulos wrote: Hi, i have the following string s and the following code, which doesn't successfully remove the \, but sucessfully removes the \\. s=Sad\\asd\asd newS= for i in s: ... if i!=\\: ... newS=newS+i ... newS 'Sadasd\x07sd' In

Re: find and remove \ character from string

2007-09-15 Thread I V
On Sat, 15 Sep 2007 19:34:45 +0300, Konstantinos Pachopoulos wrote: Hi, i have the following string s and the following code, which doesn't successfully remove the \, but sucessfully removes the \\. There is no \\ in the string; there's one \ , which gets succesfully removed.