Python Re Find Substring Leetcode 150 Solution