Black Lives Matter. Please consider donating to Black Girls Code today.

Check for empty multi dropdown

Hey guys, I want to check if a multi dropdown is empty or not

I tried to define the dropdown as such:

dcc.Dropdown(
id=‘dropdown’,
options = dd_options,
multi=True,
value = []
)

Then at app.callback I tried to check if the value is still an empty list in 3 different ways, using “if not”, “len() ==0” and " == []", none of them worked.

I also tried not defining the default value of “value” and saying “if is None”. Still didn’t work.

I also didn’t find anything to help me in the dropdown reference page.

Any ideas?
Thanks

Hey,
On multi dropdown;

so i am using;

 if input is not None:
        if len(input )>0:
            do something with input

Hope it helps