import math y1, x1 = (1,2) y2, x2 = (2,4) math.sqrt((y1-y2)**2 + (x1-x2)**2) d=(y1−y2)2+(x1−x2)2 二点間の直線距離、三平方