I was wondering if we could assert all elements in a list is not None
, therefore while a = None
will raise an error.
The sample list is [a, b, c]
I have tried assert [a, b, c] is not None
, it will return True
if any one of the elements is not None
but not verifying all. Could you help figure it out? Thanks!!
Unless you have a weird element that claims it equals None
:
assert None not in [a, b, c]