fork(1) download
  1. # Вариант 1
  2. def list_box():
  3. num = 87
  4.  
  5. def inner_box():
  6. num_2 = 65
  7. print(num+num_2)
  8.  
  9. inner_box()
  10.  
  11.  
  12. list_box()
  13.  
  14.  
  15. # Вариант 2
  16. def list_box():
  17. num = 87
  18.  
  19. def inner_box():
  20. num_2 = 65
  21. print(num+num_2)
  22.  
  23. return inner_box
  24.  
  25.  
  26. list_box()()
Success #stdin #stdout 0.02s 9068KB
stdin
Standard input is empty
stdout
152
152