Problem with a tuple - newbie ignorance

Neil Schemenauer nas at arctrix.com
Mon Jan 15 17:43:29 EST 2001


On Tue, Jan 16, 2001 at 12:00:48AM -0500, Alan Daniels wrote:
> 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')

How about:

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

I'm pretty sure that works too but I'm running Linux now and
can't test it.

  Neil




More information about the Python-list mailing list