Can someone explain to me, how to print the content of the following variables in a loop?
Week23 = [12-9, "free", 15.30-12.30, "free", 12-9]
Week24 = []
Week25 = []
Week26 = []
Week27 = []
Week28 = []
Week29 = []
...
I have tried playing around with the following, but it is not printing the content. The exec statement merely prints out "Week23" etc. The eval statement doesn't work due to a parsing error.
import numpy as np
length = np.linspace(23,42,42-23+1)
for i in length:
print("Week" + str(i))
# print(eval("Week" + str(i)))
# exec('print("Week" + str(i))')