How do I dynamically change a full sentence in a Dash app based on the selected value from a dropdown, not just a part of the sentence? but i change sentence every time
app.layout = dbc.Container([
html.H2([
'ski Resorts in ',
html.Span(id="title",children='',style={'font-weight':'bold'}),
" with peaks above elevation M"
],style={"text-align":'center'}),
html.P("Select Options Below: "),
dcc.Dropdown(
id="country-dropdown",
options=ski_resorts["Country"].unique(),
value="Andorra",
className="dbc"
)
])
@app.callback(
Output("title","children"),
Input("country-dropdown","value")
)
def hello_world(country):
print(country)
print(len(country))
print(type(country))
return country
if __name__ == "__main__":
app.run(debug=True, port=8334)```