mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-27 23:11:09 +00:00
Added more parentheses examples
This commit is contained in:
parent
2d082cf19c
commit
a8cfc14737
|
@ -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)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user