Check if None

The function check_if_none should return True if any of the parameters is None.
Please make sure that you return either True or False. Don't print.

Examples:

# Examples with None
check_if_none(None, 2, 'a', 8, 'Z')  # True
check_if_none(None, None, None, None, None)  # True

# Examples without None
check_if_none(3, 2, 'a', 8, 'Z')  # False

Test Cases

test with many none value - Run Test

def test_with_many_none_value():
    assert check_if_none(None, 2, 'a', 8, None) == True
    assert check_if_none(None, None, None, None, None) == True

test without many none value - Run Test

def test_without_many_none_value():
    assert check_if_none(0, 2, 'a', 8, 'Z') == False

test with one none value - Run Test

def test_with_one_none_value():
    assert check_if_none(None, 2, 'a', 8, 'Z') == True

Solution 1

def check_if_none(a, b, c, d, e):
    if a is None or b is None or c is None or d is None or e is None:
        return True
    return False
def check_if_none(a, b, c, d, e): pass