[Tutor] Change files

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Sun Feb 12 06:08:57 CET 2006


>      for root, dirs, files in os.walk(top):
>          for name in dirs:
>              print name
>              for name in files:

This code looks suspicious.  At this point, when we say "name", what do we
expect to get here?  Do you mean the directory name, or the file name?
It can't be both!  *grin*



More information about the Tutor mailing list