lundi 1 avril 2019

How can i test two Variables on NoneType in Python 3?

All the time I tried to compare two variables with type "None" but it doesn't work.

example:

if type(a and b) == type(None):
   #do something
else:
   #do other stuff

Does somebody know the right statement and an explanation?

Aucun commentaire:

Enregistrer un commentaire