# if 2 or more empty elements are placed together, only the 1st empty element is removed.
a=[[],[], [12, 21,5,],[54,23], []]
b=[1,0,0, 5, 6]
for aItem, bItem in zip(a,b):
if len(aItem) == 0:
a.remove(aItem)
b.remove(bItem)
print(a)
print(b)
我期待
[[12, 21, 5], [54, 23]]
[0, 5]
但是得到了
[[12, 21, 5], [54, 23], []]
[0, 0, 5]
有人可以解释吗?