Valid Parentheses Leetcode Python Study