My approach of the Thumbtack coding challenge - Problem 2 with Python