"Kent Johnson" <[EMAIL PROTECTED]> wrote
           if isinstance(x, list):
               for item in x:
                   x = item

This just assigns x to the last element of the list

Oops, yes, I said the first but in fact reassigning x does not stop the loop, it seems the loop works on a local copy of the original reference.

Alan G

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to