from e2b_code_interpreter import Sandbox with Sandbox() as sandbox: sandbox.run_code("x = 1") execution = sandbox.run_code("x+=1; x") print(execution.text) # outputs 2