This is a part of my python code, I need to scan a | Chegg.com
How to solve longest valid parenthesis problem using dynamic programming - Quora
Ned Batchelder on X: "Python strings are iterable, giving you their characters. This is sometimes inconvenient, but here it's used three different ways to check if a string has properly balanced parentheses