Using different lists in a for loop

hi, i just want to use different lists in a for loop. but i cant pick them one bu one. i want to make same operation with different lists. i hope i can defene myself correctle. sory for bad language.

sample1=[ 1.032, 1.054, 1.044, 1.030, 1.066]
sample2=[1.361 ,1.394, 1.304, 1.431, 1.474]
sample3=[1.823 ,1.8026, 1.771, 1.783 ,1.764]
sample4=[2.1693, 2.1678 ,2.1593 ,2.1788, 2.1712]
sample5=[2.5918, 2.5860, 2.5859, 2.5925, 2.5815]
sample6=[2.978, 2.983, 3.005 ,2.99, 2.996]

for i in range (6):

uncert("sample"+str(i)) # what should i write here thank you

Don’t give each list a new name. Have a list of lists:

samples = [  # list of lists
             [1.032, 1.054, 1.044, 1.030, 1.066],
             [1.361, 1.394, 1.304, 1.431, 1.474],
             [1.823, 1.8026, 1.771, 1.783, 1.764],
             [2.1693, 2.1678, 2.1593, 2.1788, 2.1712],
             [2.5918, 2.5860, 2.5859, 2.5925, 2.5815],
             [2.978, 2.983, 3.005, 2.99, 2.996],
             ]

for data in samples:
    print(data)  # prints each list
    for value in data:
        print(value)  # print each value
1 Like

thank you. i will try it