I have an array say numbers = [4,4,9,2,3]
and I want to to find the lowest value within a custom range.
Range of index 2
, I want the lowest value from [4, 4, 9]
.
so far, I have:
min(range(numbers[2))
I have an array say numbers = [4,4,9,2,3]
and I want to to find the lowest value within a custom range.
Range of index 2
, I want the lowest value from [4, 4, 9]
.
so far, I have:
min(range(numbers[2))
You don't need to use range, arrays already support slicing through subscripts:
min(numbers[:3])