I have a list inside a loop for e.g
A=[25,45,34,....87]
in the next iteration A should be
A=[[25,32],[45,13],[34,65],....[87,54]]
in the next iteration A should be
A=[[25,32,44],[45,13,67],[34,65,89],....[87,54,42]]
and so on.How can i do that?is it possible?The code i am working on is
s=0
e=25
for i in range(0,4800):
if not m_list_l:
m_list_l.append(max(gray_sum[s:e]))
m_list_l[i].append(max(gray_sum[s:e]))
s+=25
e+=25
But this give me Error as
m_list_l[i].append(max(gray_sum[s:e]))
AttributeError: 'int' object has no attribute 'append'
m_list_l[i].append()do before there are nested lists?gray_sumandm_list_lare. Can you update your question to include a runnable example that produces the error?