I used a for loop to construct a dictionary:
dict = {}
for i in np.arange(0, n):
dict[i] = some_data[i]
Then I want to pass the items of the dictionary to a function:
function(dict[0], dict[1], dict[2], ... dict[n])
As n
tends to vary between different datasets, is there a way for me to pass multiple inputs to the function without having to manually input dict[0]
to dict[n]
every time?
I tried to construct an array of [dict[0], dict[1], ..., dict[n]]
but the function did not accept an array as the input.