import numpy as np
def f():
global a, b
a=100
b=200
np.random.seed(111)
f()
a, b, np.random.uniform(0,1)
(100, 200, 0.6121701756176187)
from ipywidgets import Output
from IPython.display import clear_output
from IPython.display import display
out = Output()
display(out)
with out:
print(1)
print(2)
Output()
2
with out:
clear_output()