fork download
  1. def failure():
  2. locals()['x'] = 2
  3. print(x)
  4. failure()
Runtime error #stdin #stdout #stderr 0.02s 27704KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
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