Problem with a tuple - newbie ignorance

Remco Gerlich scarblac at pino.selwerd.nl
Tue Jan 16 07:33:59 EST 2001


Alan Daniels <danielsatalandanielsdotcom> wrote in comp.lang.python:

> 3) If you find yourself doing the double-backslash a lot (thanks,
> Microsoft!), rather than typing...
> > dir = os.listdir('D:\\statlab\\ssda\\data')
> ...you can write this as...
> 
>   dir = os.listdir(r'D:\statlab\ssda\data')

Also, a / works just as well:

dir = os.listdir('D:/statlab/ssda/data')

It works, but it's kind of secret, it seems :)

-- 
Remco Gerlich



More information about the Python-list mailing list