def ffff data 60 len data result for in range start end start 60 resul

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
def ffff(data): # [1,2,3,4,5]
t = 60
n = len(data)//t
result = []
for i in range(n):
start = i * t
end = start + 60
result.append(sum(data[start:end])/t)
return result
def ffffff(data):
t = 60
n = int(len(data)//t)*60
result = []
for i in range(n):
start = i
end = start + 60
result.append(sum(data[start:end])/t)
return result