scottusenet at ithink.org wrote: > Is it possible to use exec to run code that includes a loop? For example: > a='for b in range(4):\n print b' exec a This fails with a syntax error. add a newline to the end of the string, and it'll work. </F>