<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">&gt; It'll work on lists and tuples, for simple examples.&nbsp; But beware that <br>&gt; when you iterate through strings, the individual characters are also <br>&gt; strings, and this function will fail with an error like:<br>&gt;&nbsp; &nbsp; RuntimeError: maximum recursion depth exceeded<br><br>Oh, good catch Dave.<br><br>So you'd want to add an explicit check for a string.<br>And in&nbsp; fact you probably don't want to "flatten" a string into <br>individual characters anyway!<br><br>Alan G.<br></div></div>
</div></body></html>