Leetcode Longest Substring Without Duplicates In Python