I'm trying to create a list of names for my parameters that I want a function to take. The length should be 32
and I want something like bs=[b0,b1,b2,...,b31]
but I don't want to write in b0,b1,...
for the hand so is there any way to write a small programme in Python that can generate such a list?
EDIT: Is there anyway to make the parameter values not be strings? I'm trying to put them as arguments in a function like so:
def chiwork(a0,a1,a2,a3,bs):
ana=np.array([a0,a1,a2,a3])
betalat=[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3]
chia=sum((ana-a)**2)+sum((bs*a[betalat]-amssr)**2)
return chia
The function needs to "know" that there are 32 bs but there is no way to unpack it when the elements in bs are in a list.