I think that means it's calling exec () on each line individually. The interpreter doesn't realize that print () is part of that loop. Try not sending EOT on the for loop line. If that works, you're ...
When using tkinter in an interactive Python session, the EventHook function in Modules/_tkinter.c runs the Tcl/Tk event loop, and exits once data become available on stdin (i.e., when the user types ...
Results that may be inaccessible to you are currently showing.
Hide inaccessible results