I have a simple example I\'ve drawn up. I thought it was possible to combine if statements and for loops with minimal effort in Python. Given:
sublists = [numb
if you want to filter out all the empty sub list from your original sub lists, you will have to do something like below. this will give you all the non empty sub list.
print([sublist for sublist in sublists if sublist])
*edited for syntax