[Tutor] all right students, what do we learn
alan.gauld at btinternet.com
Mon Nov 3 01:31:55 CET 2014
On 02/11/14 21:49, Dave Angel wrote:
> But it doesn't. print() returns None, which is false.
Oops, of course it does!
I got confused by looking in the interpreter which, of course,
printed out the string but I mistook it for a return value!
So in fact Clayton's code never executes the exec() at all
because an initial false in an and terminates evaluation.
Author of the Learn to Program web site
More information about the Tutor