mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
made it compatible with python 3.x
This commit is contained in:
@ -44,13 +44,13 @@ def is_balanced(S):
|
||||
|
||||
def main():
|
||||
|
||||
S = input("Enter sequence of brackets within quotes: ")
|
||||
S = input("Enter sequence of brackets: ")
|
||||
|
||||
if is_balanced(S):
|
||||
print S, "is balanced"
|
||||
print(S, "is balanced")
|
||||
|
||||
else:
|
||||
print S, "is not balanced"
|
||||
print(S, "is not balanced")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Reference in New Issue
Block a user