[Solved] How to declare multiple similar variables in python? [duplicate]


I would suggest using a Dictionary for this task:

d = {}

for x in range(1,10):
        d["slider{0}".format(x)]= models.IntegerField(widget=widgets.Slider, default=50, label="")

2

solved How to declare multiple similar variables in python? [duplicate]