Request for feedback on my first Python program

Achim Domma domma at procoders.net
Fri May 30 03:34:32 EDT 2003


"Scott Meyers" <Usenet at aristeia.com> wrote in message
news:MPG.194096b51af188bb9896f0 at news.hevanet.com...

> Aside from being ugly (how do I get rid of the newline that follows each
> directory or file name?), the problem is that the first entry IS a
> directory and the second one IS a file.  So clearly I'm doing something
> wrong.  Any idea what it is?

The problem is the newline at the end of the line. If you remove it, for
example with 'strip', your code will work.

Achim






More information about the Python-list mailing list