I'm building a dashboard based on plotly Dash. One of the dcc is a Slider. If I want to show marks on the slider that are within a certain range of numbers, then this works just fine:
dcc.Slider(min=-10, max=20, step=1, value=0, marks={i: str(i) for i in range(-10, 20)})
But Dash documentation prefers to use dict notation. But if I do this:
dcc.Slider(min=-10, max=20, step=1, value=0, marks=dict(i = str(i) for i in range(-10,20)))
then I receive a Syntax Error
How can I implement this functionality using dict notation?