mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
made it compatible with python 3.x
This commit is contained in:
@ -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__":
|
||||||
|
Reference in New Issue
Block a user