I was trying to return the True value when writing the statement:
list = [[],[],[],[]]
list == []
Instead it returns False
My nested list consists of a variable number of empty lists. How do I write a single statement that could apply to nested list of [1/2/3...] empty lists?
all(x == [] for x in your_list)
to return True if all empty
any(x != [] for x in your_list)
to return True if at least on is not empty