I am trying to create a number of variables that I can use based on the input to a function function(n), so I have n variables, all titled x1, x2,...,xn. As well, could I call the variables with like a loop with something almost like
for i in range(1,n+1):
print(xi)
this is what I tried
def createVar(n):
var='x'+str(n)
Vars=globals()
Vars[var]=0