为什么这个循环不起作用?
list = [[1,2,3,4],[2,3,4,5]]
t=[]
for i in list:
it=[]
t.append(it)
for j in x:
if j==2:
it.append(j)
想t=[[2],[2]]
为什么这个循环不起作用?
list = [[1,2,3,4],[2,3,4,5]]
t=[]
for i in list:
it=[]
t.append(it)
for j in x:
if j==2:
it.append(j)
想t=[[2],[2]]