vendredi 1 mai 2020

How to return True when detecting a nested list of empty lists?

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?

Aucun commentaire:

Enregistrer un commentaire