Longest Substring Leetcode Solution In Python Program