How to achieve the number of inputs is determined dynamically by callback

@app.callback(Output(‘output’, ‘children’),
[Input(f’btn{i}’,‘n_clicks’) for i in range(n)])
def output(*args):
pass

the n is determined by length of dcc.Store(‘store’,‘data’)'s data
How to achieve it,Thank you very much!

@chriddyp,@Philippe
Can you help me,thank you very much!

Take the n_click_timestamp props instead for the inputs. Then find the highest one in args and do args.index(highest), you now have your btn id.

thank you @Philippe
Like example:[Input(f’btn{i}’,‘n_clicks’) for i in range(n)],
button id is undefined,determined by n,
and n is determined by length of dcc.Store(‘store’,‘data’)'s data

My difficulty is can not get n ,it is not a global variable,but a local variable
it is length of dcc.Store(‘store’,‘data’)'s data

Did you find any solution?? I have a similar problem. Thanks!