I came across a Python question : What is the best way to check if a pool is empty? on SO.
Now, if I want to return True ( False ) depending on whether the coll collection is non-empty (empty) from a function, what is the recommended way to do this? return not not coll ?
True
False
coll
return not not coll
you can use
return bool(coll)