made it compatible with python 3.x

This commit is contained in:
alvin562 2016-12-11 01:35:51 -08:00
parent a75a64aa9b
commit 1d765f9104

View File

@ -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__":