def hamming_distance(Subspace1, Subspace2):
    """
    Returns the Hamming distance between to subspaces.
    Variables that are free in either subspace are ignored.

    **arguments**:
        * *Subspace1, Subspace2* (dict): subspaces in dictionary representation

    **returns**:
        * *Distance* (int): the distance between *Subspace1* and *Subspace2*

    **example**:

        >>> hamming_distance({"v1":0,"v2":0}, {"v1":1,"v2":1})
        2
        >>> hamming_distance({"v1":1}, {"v2":0})
        0
    """
    
    return len([k for k, v in Subspace1.items() if k in Subspace2 and Subspace2[k] != v])