Update balanced_parentheses.py (#538)

This commit is contained in:
Hrushikesh Hanbar 2018-10-30 19:59:12 +05:30 committed by Harshil
parent 75d11f9034
commit f1ec84af84

View File

@ -6,7 +6,7 @@ __author__ = 'Omkar Pathak'
def balanced_parentheses(parentheses): def balanced_parentheses(parentheses):
""" Use a stack to check if a string of parentheses are balanced.""" """ Use a stack to check if a string of parentheses is balanced."""
stack = Stack(len(parentheses)) stack = Stack(len(parentheses))
for parenthesis in parentheses: for parenthesis in parentheses:
if parenthesis == '(': if parenthesis == '(':