fork download
  1. def f(x):
  2. try:
  3. if x==0:
  4. raise 123
  5. return 1
  6. except:
  7. return 2
  8. finally:
  9. print ("hello")
  10.  
  11.  
  12. print(f'f1: {f(1)}')
  13. print(f'f0: {f(0)}')
Success #stdin #stdout 0.02s 9308KB
stdin
Standard input is empty
stdout
hello
f1: 1
hello
f0: 2