ANSWER USING PYTHON
A string is considered to have valid parentheses if there are anequal number of opening/closing brackets and each closing bracket –e.g., ), }, or ] – matches the most recent, unmatched openingbracket – e.g., (, {, or [. For example:
( ( { } ) ) is valid
{ [ { ( ) } ] } is valid
(){}[] is valid
( ( } ) is invalid
Checking the validity of parentheses is important in verifyingthe validity of programming code and mathematical statements.Create a new Python file called validator.py with a single functioncalled isvalid(string). This function will take a single stringthat can consist
PayPal Gateway not configured
PayPal Gateway not configured