def distance_between_pts(a=(0.0, 0.0), b=(0.0, 0.0)):
    '''Return the distance between two points on N dimensions (Euclidean distance).
    '''
    assert isinstance(a, tuple)
    assert isinstance(b, tuple)
    l_pt = len(a)
    assert l_pt > 1
    assert l_pt == len(b)
    for i in a:
        assert isinstance(i, float)
    for i in b:
        assert isinstance(i, float)

    return sqrt(sum([(b[i] - a[i])**2 for i in range(l_pt)]))
def distance_between_pts ( a = ( 0.0 , 0.0 ) , b = ( 0.0 , 0.0 ) ) : assert isinstance ( a , tuple ) assert isinstance ( b , tuple ) l_pt = len ( a ) assert l_pt > 1 assert l_pt == len ( b ) for i in a : assert isinstance ( i , float ) for i in b : assert isinstance ( i , float ) return sqrt ( sum ( [ ( b [ i ] - a [ i ] ) ** 2 for i in range ( l_pt ) ] ) )
Return the distance between two points on N dimensions (Euclidean distance).