mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-27 00:46:43 +00:00
made it compatible with python 3.x
This commit is contained in:
parent
a75a64aa9b
commit
1d765f9104
@ -44,13 +44,13 @@ def is_balanced(S):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
S = input("Enter sequence of brackets within quotes: ")
|
S = input("Enter sequence of brackets: ")
|
||||||
|
|
||||||
if is_balanced(S):
|
if is_balanced(S):
|
||||||
print S, "is balanced"
|
print(S, "is balanced")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print S, "is not balanced"
|
print(S, "is not balanced")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user