I'm trying to define k variables looking like x1, x2, ...xn, where each is a list (each list has 5 elements). meaning:
something like this:
for i in [1..100]:
"x" + str(i) = [ i + 2, i + 3, i + 3, i + 2, i + 4]
print ""x" + str(i)", 'x' + str(i)
ideal output:
x1 = [3,4,4,3,5]
x2 = ...
x3
x4
.
.
.
x100 =
I am getting 'invalid syntax' messages. I'm open to anything that can get me over this fairly simple hurdle.
x1, x2, x3...Wouldn't you rather create a list that contains a hundred lists? That way you could access them asx[0], x[1], x[2]...x1 - x2in your approach). Or do you mean you want to dox[0][0] - x[1][0]or something like that?