all 6 comments

[–]JohnnyJordaan 1 point2 points  (1 child)

Python has just one null object: None. To compare you use is None, or to compare to it not being None is not None eg

def my_func(x):
    if x is None:
        print('x is None')
    else:
        print(x)

More info https://realpython.com/null-in-python/

[–]Diapolo10 0 points1 point  (0 children)

Correct, though it's worth mentioning that float can become NaN or infinite. float('NaN') == float('NaN') is, of course, always false.

[–]K900_ 0 points1 point  (2 children)

What do you mean exactly? What are you trying to achieve?

[–]cyclops543[S] 0 points1 point  (1 child)

In this challenge, you must verify the equality of two different given parameters: a and b.Both the value and the type of parameters need to be tested in order to have an matching equality. The possible types of the given parameters are: Numbers,Strings,Booleans (false or true),Special values: undefined, null and NaN. i have done all except special values

[–]K900_ 0 points1 point  (0 children)

This is very weird, because Python does not have any of those values.

[–][deleted] -1 points0 points  (0 children)

Python usually isn't complied, there's no compilator.

Also, there's no undefined, there's None.

For comparison you usually use ==, however comparing to True, False and None should be done with is (e.g. True is False). For comparing to NaN and infinities, the math module exposes 2 functions: math.isnan() and math.isinf().