def sametype(variable1, variable2):
    """
    Check if 2 variables have the same type

    :type variable1: variable
    :param variable1: The first variable to check

    :type variable2: variable
    :param variable2: The second variable to check

    >>> sametype(True, False)
    True

    >>> sametype(True, "foo")
    False
    """

    # Return the result
    return isinstance(variable1, type(variable2))