Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Errer generating Inputs in loop, but not by hand

$
0
0

@michaelfboxer wrote:

def gen_inputs(input_count):
      my_list = []
      for i in range(input_count):
             my_list.append(Input(id = f'a{i}',  component_property='value'))

return my_list

above doesnt work

def test():
     return [Input(id = f'a0',  component_property='value'),Input(id = f'a1',  component_property='value')]
 
above does work

edit: formatting

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles