Simple syntax question

Greg Fortune lists at gregfortune.com
Sun May 11 03:13:00 EDT 2003


It stands for "raw string"  Typically, they are most useful when you need 
to use a string that has a bunch of \ characters in it.  Regular 
expressions are an example of when raw strings are very useful.  Basically, 
the \ character does not need escaped in a raw string.

Greg Fortune
Fortune Solutions

combe wrote:

> Hi, all
> 
> I'm reading the "Programming Python" bible and I often find the following
> syntax :
> 
> MyVar = r'some strig data'
> 
> I can't see what the "r" stands for. I looked in several books but
> probably to the wrong place :-)
> 
> I would appreciate if someone could gine me the answer or tell me where to
> search.
> 
> Regards
> Michel Combe





More information about the Python-list mailing list