Code formatting
This commit is contained in:
parent
93082b4cd9
commit
6e57047c6a
2 changed files with 8 additions and 3 deletions
|
@ -7,7 +7,10 @@ instr = open("../input.txt").read()
|
|||
expressions = instr.strip().split("\n")
|
||||
|
||||
expressions = [
|
||||
partOne.parse_expression(list(("( " + x.replace("*", ") * (") + " )").replace(" ", "")))[0] for x in instr.strip().split("\n")
|
||||
partOne.parse_expression(
|
||||
list(("( " + x.replace("*", ") * (") + " )").replace(" ", ""))
|
||||
)[0]
|
||||
for x in instr.strip().split("\n")
|
||||
]
|
||||
|
||||
sigma = 0
|
||||
|
@ -15,4 +18,4 @@ sigma = 0
|
|||
for expression in expressions:
|
||||
sigma += partOne.calculate(expression)
|
||||
|
||||
print(sigma)
|
||||
print(sigma)
|
||||
|
|
|
@ -29,7 +29,9 @@ def parse(instr: str) -> List[Tile]:
|
|||
return [Tile(x) for x in instr.strip().split("\n\n")]
|
||||
|
||||
|
||||
def get_edge_information(tiles:List[Tile]) -> Tuple[Dict[str, Set[int]], Dict[int, int]]:
|
||||
def get_edge_information(
|
||||
tiles: List[Tile],
|
||||
) -> Tuple[Dict[str, Set[int]], Dict[int, int]]:
|
||||
edges = {}
|
||||
shared_edge_count = {x.number: 0 for x in tiles}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue