[Tutor] convert '\\t' to '\t'

Hy Python pythonpython@hotmail.com
Thu Jan 16 01:07:02 2003


Thanks for you reply, Fred.

This will not work.
Python throws out "SyntaxError: invalid token"
when you try to run textstring = textstring.replace('//', '/')

'/' is not a valid string.


Hy




>From: Alfred Milgrom <fredm@smartypantsco.com>
>To: tutor@python.org,pythonpython@hotmail.com
>Subject: Re: [Tutor] convert '\\t' to '\t' Date: Thu, 16 Jan 2003 17:00:28 
>+1100
>
> >> Could anyone please give me some tips on converting things like '\\t' 
>into '\t'?
>
>I am not sure that's really your question. If it's just a simple string 
>substitution, you can use
>
>textstring = 'something or other containing //t'
>textstring = textstring.replace('//', '/')
>
>But I suspect you actually want to do something else.
>Fred Milgrom


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE* 
http://join.msn.com/?page=features/virus