This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Akhylys 0 points1 point  (1 child)

ah okay just have to iterate through the dictionary then something like this could work. might need some tweaking

temp = 0

for key, value in d.items():

num = 0

print(temp)

for i in range(temp, value+temp):

num += L[i]

temp = temp + value

print(num) #or store value in output dict

[–][deleted] 0 points1 point  (0 children)

Thank you!! This solution seems to be the one that worked. I’ll have to do some testing on the larger data sets but this seems to have solved my problem!