<jupyter_start><jupyter_text>Mit Widgets interagieren<jupyter_code>import ipywidgets as widgets
from IPython.display import display
slider = widgets.IntSlider(
    value=7,
    min=0,
    max=10,
    # step=1,
    description='X-Wert:',
    orientation='horizontal',
    slider_color='white'
)

def on_slider_move(b):
    print(b["new"])
    print("Slider wurde bewegt!")

slider.observe(on_slider_move, names="value")
display(slider)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12931034482758622, 'fraction_numerical': 0.010775862068965518, 'mean_word_length': 5.36986301369863, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '501513', 'license': 'MIT', 'n_tokens_mistral': 174, 'n_tokens_neox': 171, 'n_words': 28, 'path': 'UDEMY_Datavis_Python/08 - jupyter widgets/Mit Widgets interagieren.ipynb', 'repo_name': 'Priskawa/GITHUB_ME', 'size': '464'}