Leetcode Find The Longest Substring In String In Python