Valid Parentheses Leetcode Python Beginner