fixed logic

This commit is contained in:
Lu Baumann 2023-10-16 23:40:58 +02:00 committed by GitHub
parent 59213e8145
commit 2e34f1b6c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,9 +15,9 @@ def brackets(text):
if slash == 2:
break
continue
if i == "{":
elif i == "{":
res += 1
if i == "}":
elif i == "}":
res -= 1
slash = 0
return res