first couple python scripts; one uses modified version of dijkstra to solve string problem