Balancing Parentheses Using Stack In Python Using List