How to get minimum value in predefined set list in python 3.x?
I have a list of data 'a'
a = {44.1, 78.2, 74.2, 85.4, 107.6, 167.7, 221.6, 245.2, 299.2, 314.5}
I wanted to get minimum value for 3 consecutive data range, starting from the last three, coming forward to the first three data.
Minimum value of last three (245.2, 299.2, 314.5), next three (221.6, 245.2, 299.2), next three (167.7, 221.6, 245.2) and so on until first three (44.1, 78.2, 74.2). The minimum values should become a list as well.
This is what I tried but failed.
i = list(range(-1, -10, -1))
value = min(a[i - 3:i])
print(value)
I got this error
TypeError: unsupported operand type(s) for -: 'list' and 'int'
at line 2.