On Mon, Oct 3, 2011 at 2:10 PM, rantingrick <rantingr...@gmail.com> wrote: > Also for scoping. > > py> count = 0 > py> def foo(): > ... global.count += 1 > py> print count > 1 > > Why? Well because many times i find myself wondering if this or that > variable is local or global -- and when i say "global" i am speaking > of module scope! The "global<DOT>" cures the ill.
def add_from_input(num_lines): total = global.sum(global.int(global.input()) for i in global.range(num_lines)) global.print("The total is", total) Yes, that's much better. -- http://mail.python.org/mailman/listinfo/python-list