Shortest distance and shortest path in weighted graph? in python

I am following the course The Ultimate Data Structures & Algorithms: Part 2. However, I got stuck in the videos from 6 to 8 in the undirected graphs section. 6- exercise- getting the shortest distance Is there any python version for finding the shortest distance?

RosettaCode has an implementation of Dijkstra’s algorithm in almost every language including Python:’s_algorithm#Python