def func(): value = "not-none" # Is none # If it's none if value is None: print("None") # Is not none # If it's not none else: print("Not none")