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
Immediately solved this in the interpreter right after I posted.
for x in ( x for x in sublists if x ):
Not as clean as I'd like, the nested if statement is more readable in my opinion. I'm open to other suggestions if there is a cleaner way.