Rory Campbell-Lange <[EMAIL PROTECTED]> wrote:
>
>Hi. How can I list root and only one level down? I've tried setting dirs
>= [] if root != start root, but it doesn't work. I clearly don't
>understand how the function works. I'd be grateful for some pointers.

The statement
    dir = []
does not actually change the list that was passed in.  It creates a NEW
empty list and binds it to "dir".

If you want to empty the "dir" variable, try:
    del dir[:]
-- 
- Tim Roberts, [EMAIL PROTECTED]
  Providenza & Boekelheide, Inc.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to