Stacks in python

Order Description

Use a stack to determine whether or not a string has balanced usage of parenthesis.

Example:

    (),  ()(), (({[]})) - Balanced

    ((), {{{)}],[][]]] - Not balanced

 

Balanced Example:{[]}

Non-Balanced Example: (()

Non balanced Example: ))