I am currently trying to define a number of variables as empty lists (equal in quantity to the number of iterations of the loop). So far I've tried the following:
for i in [1,2,3]:
locals()["temp_set_" + str(i)] = []
When I try to print(temp_set_1)
outside of the loop in order to verify the output, I get the following error: NameError: global name 'temp_set_1' is not defined
I am not sure what I'm doing wrong at the moment and would appreciate it if someone could point me in the right direction.