In [21]:
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 )  
In [23]:
distance( (1,2), (2,3))
Out[23]:
1.4142135623730951