> It'll work on lists and tuples, for simple examples. But beware that > when you iterate through strings, the individual characters are also > strings, and this function will fail with an error like: > RuntimeError: maximum recursion depth exceeded
Oh, good catch Dave. So you'd want to add an explicit check for a string. And in fact you probably don't want to "flatten" a string into individual characters anyway! Alan G.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor