Added more parentheses examples

This commit is contained in:
Mikael Souza 2018-12-17 10:45:16 -04:00
parent 2d082cf19c
commit a8cfc14737

View File

@ -17,7 +17,7 @@ def balanced_parentheses(parentheses):
if __name__ == '__main__': if __name__ == '__main__':
examples = ['((()))', '((())'] examples = ['((()))', '((())', '(()))']
print('Balanced parentheses demonstration:\n') print('Balanced parentheses demonstration:\n')
for example in examples: for example in examples:
print(example + ': ' + str(balanced_parentheses(example))) print(example + ': ' + str(balanced_parentheses(example)))