There was an error while loading. Please reload this page.
1 parent f4640de commit 9eac458Copy full SHA for 9eac458
shared/paul2708/input_reader.py
@@ -1,6 +1,22 @@
1
from typing import List
2
3
4
+def read_split_lines(day: str) -> List[List[str]]:
5
+ total_groups = []
6
+ group = []
7
+ for line in read_lines(day):
8
+ if not line.strip():
9
+ total_groups.append(group)
10
11
+ continue
12
+
13
+ group.append(line)
14
15
16
17
+ return total_groups
18
19
20
def read_ints(day: str) -> List[int]:
21
file = open(f"../../../shared/paul2708/input/{day}.txt", "r")
22
@@ -13,6 +29,7 @@ def read_ints(day: str) -> List[int]:
29
file.close()
30
return ints
31
32
33
def read_lines(day: str) -> List[str]:
34
35
0 commit comments