def foo(i): def bar(): print i i = 42 bar() foo(10) # Outputs "42", not "10"
Standard input is empty
42
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!