I've added comments to make understanding this method a little easier for those that are not familiar. This should close out #727 .
Other changes:
1. added if __name__ == '__main__' rather than the "# MAIN" comment
2. put in return for distances and vertices. Previously everything was just printed out, but someone may find it useful to have the algorithm return something.
3. Other PEP8 changes
4. Added example input and expected output as a check to make sure any future changes will give the same output.