summaryrefslogtreecommitdiff
path: root/2015/01/not_quite_lisp.py
blob: d7c59d45336b781fd7cadac60dcd0a9fea6b4273 (plain)
1
2
3
4
5
6
7
8
9
floor = 0
with open("input", encoding="utf-8") as f:
    text = f.read()
for char in text:
    if char == '(':
        floor += 1
    elif char == ')':
        floor -= 1
print(f"floor is {floor}")