I have a list of float values, something like [-2.4, -1.3, -3.8, -1.9, 5.0, 0.6, 2.9, 1.9, 4.7, 3.5, 6.9, 1.5, -4.2, 3.7, 2.1, 6.6, 7.0, -4.6, -4.9].
What I need and trying to do is count the longest streak of values >0.
Tried doing it through for loop, but it gives only a total count, and through itertools.groupby, but I'm still getting only values.
for i, x in groupby(mintemps):
if float(i >= 0):
print(len(list(x)))
Any help would be greatly appreciated.