Consider the following loop:
import random
for m in range(0,2):
rand_list=[]
n=10
for i in range(n):
rand_list.append(random.randint(3,9))
print(rand_list)
That outputs two lists as:
[6, 9, 8, 7, 4, 8, 8, 4, 9, 9]
[9, 5, 3, 8, 3, 4, 8, 9, 3, 3]
How can I possibly label them with the dummy variable m
define in the loop, for example lst[0],lst[1]
or such, in order to compose the mean result
lst_mean = lst[0]+lst[1]/2
or similar quantities?
Note I know that the indexing here is not correct. The idea is that in the end of the loop for each m
I define a list labeled by m
and contains the corresponding result of rand_list
.