a = np.random.randint(1, 10, (3,3))
b = np.random.randint(1, 10, (3,3))
c = None
l1 = [a, b, c]
for l in l1:
if l is None:
l1.remove(l)
l1
I am getting ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all(). Since it already checks if l is none then why can it not remove it ?