from math import sqrt # fonction racine carrée def distance(A, B): xA, yA = A xB, yB = B return sqrt( (xB - xA)**2 + (yB - yA)**2 )
distance( (1,2), (2,3))
1.4142135623730951