I use multiple metrics to compute distance between strings and I store the result inside a matrix using cdist from Scipy library (here you can find
cdist
Scipy