Is there a Pythonic way to check if a list (a nested list with elements & lists) is essentially empty? What I mean by
Use the any() function. This returns True if any list within the list is not empty.
any()
True
alist = [[],[]] if not any(alist): print("Empty list!") >> Empty list!
see: https://www.programiz.com/python-programming/methods/built-in/any