def failure(): locals()['x'] = 2 print(x)failure()
Standard input is empty
Standard output is empty
Traceback (most recent call last): File "./prog.py", line 4, in <module> File "./prog.py", line 3, in failure NameError: name 'x' is not defined
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!