我得到TypeError: 'int' object is not iterable
下面的代码,为什么?
def temp_media(c, l):
c_ini = c
l_ini = l
res_vert = 0
res_horiz = 0
dim = dimensoes()
c_max = dim[0] // 2
l_max = dim[1]
for l in l_max:
for c in c_max:
res_vert = res_vert + calcula_temp(c, l)
res_horiz = res_horiz + calcula_temp(c, l)
return (((res_horiz / (c_max - c_ini)) + (res_vert / (l_max - l_ini))) / 2)
我怎样才能解决这个问题?