📅  最后修改于: 2022-03-11 14:45:06.795000             🧑  作者: Mango
import math
class point:
def __init__(self, x, y, z):
self.x = x
self.y = y
self.z = z
p1 = point(10,14,0)
p2 = point(14,14,0)
distanceByTwoPoints = math.sqrt((p1.y-p2.y)**2 + (p1.x-p2.x)**2)