This is a cross post of @life-hacker/leetcode-challenge-python3-problem-3 by @life-hacker.@life-hacker/leetcode-challenge-python3-problem-3