I have a list of lists say E[ ][ ], where E has ten sub-lists, each having around 500 entries.
My prime concern is to calculate the maximum of all the 5000 values, which are distributed in ten sub-lists.
Now, what I wrote was this:
MinVal = min(min(E[i]) for i in range(len(E)))
and it gave me this error: ValueError: min() arg is an empty sequence
Now I wrote this:
min_arr = []
for i in range(len(E)):
min_arr.append(min(E[i]))
MinVal = min(min_arr)
and it gives me the same error: ValueError: min() arg is an empty sequence
So, I just try out doing this:
print(max(E[1]))
and it DOES give me the answer
The first two codes also work for small 5-10 element lists. But shows an issue with large data sets.
What should I do?