示例#1
0
s.pop()

s.push(2)

s.push('hey')
s.show()

s.push(True)
s.show()

s.push(34534)
a = s.show()

s.peek()

s.revstring()

#**************************************************************************
#Simple Balanced Parentheses
#**************************************************************************

#(5+6)∗(7+8)/(4+3)


def parChecker(symbolString):
    s = Stack()
    balanced = True
    index = 0
    while index < len(symbolString) and balanced:
        symbol = symbolString[index]
        if symbol == "(":