'The Euclidean distance from self to point p.
Parameters
p : Point
Returns
distance : number or symbolic expression.
See Also
sympy.geometry.line.Segment.length
sympy.geometry.point.Point.taxicab_distance
Examples
>>> from sympy.geometry import Point
>>> p1, p2 = Point(1, 1), Point(4, 5)
>>> p1.distance(p2)
5
>>> from sympy.abc import x, y
>>> p3 = Point(x, y)
>>> p3.distance(Point(0, 0))
sqrt(x**2 + y**2)'

def distance(self, p):

    (s, p) = Point._normalize_dimension(self, Point(p))
    return sqrt(Add(*(((a - b) ** 2) for (a, b) in zip(s, p))))
