"Kent Johnson" <kent37 at tds.net> 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