I have a list of listA
; each element of A is a list.
I want a condition (to use for a if statement) that return True
if all the element of A
are non empty and False
otherwise.
How can I express this condition?
Example 1
A = [[], [5]]
if (condition):
print("no empty list as elements of A")
else:
print("at least an empty list inside A")
Run Code Online (Sandbox Code Playgroud)
>>> at least an empty list inside A
Run Code Online (Sandbox Code Playgroud)
Example 2
>>> …
Run Code Online (Sandbox Code Playgroud)