def testloop(n):
    for i in range(n):
        print(i)

testloop(5)
0
1
2
3
4
import ipywidgets as widgets
widgets.FloatProgress(
    value=7.5,
    min=5.0,
    max=10.0,
    step=0.1,
    description='Loading:',
)
from IPython.display import display
w = widgets.Dropdown(
    options={'One': 1, 'Two': 2, 'Three': 3},
    value=2,
    description='Number:',
)
display(w)
widgets.RadioButtons(
    description='Pizza topping:',
    options=['pepperoni', 'pineapple', 'anchovies'],
)
widgets.Button(description='Click me')