mirror of
https://github.com/ershisan99/advent-of-code.git
synced 2025-12-17 20:49:29 +00:00
2015 day 1 part 2 refactor
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import os
|
||||
|
||||
abs_file_path = os.path.join(os.path.dirname(__file__), "./input.txt")
|
||||
|
||||
input = open(abs_file_path).read().strip()
|
||||
file_path = os.path.join(os.path.dirname(__file__), "./input.txt")
|
||||
input = open(file_path).read().strip()
|
||||
|
||||
result = input.count("(") - input.count(")")
|
||||
|
||||
print(result)
|
||||
|
||||
Reference in New Issue
Block a user