Out of these not None tests.

if val != None:

if not (val is None):

if val is not None:

Which one is preferable, and why?

4 s
4

Leave a Reply

Your email address will not be published. Required fields are marked *