# Python Shorts — Earth Distance

Published in

4 min readJun 24, 2022

--

Here’s a short Python function that makes it easy to calculate the shortest distance between any two points on the planet.

The distance between two x,y points in a plane is easily found using the Pythagorean theorem. However, the distance between two points on a sphere, such as the earth, is more complicated. But Python makes it easy! Here’s the whole function to get it done…