18 lines
297 B
Python
18 lines
297 B
Python
#!/bin/python3
|
|
|
|
import sys
|
|
from pprint import pprint
|
|
|
|
input_f = sys.argv[1]
|
|
|
|
result = 0
|
|
|
|
with open(input_f) as file:
|
|
for line in file:
|
|
for idx,i in enumerate(line):
|
|
if i == '(':
|
|
result += 1
|
|
if i == ')':
|
|
result -= 1
|
|
print(result)
|