day13 - remember the f'ing zip()! It's not *that* hard ...
This commit is contained in:
parent
a6b88855c8
commit
082a65b36b
5
day13.py
5
day13.py
@ -6,10 +6,7 @@ from typing import Any
|
||||
|
||||
|
||||
def packet_compare(left: list, right: list, debug: int = 0) -> int:
|
||||
for i in range(min(len(left), len(right))):
|
||||
l_value = left[i]
|
||||
r_value = right[i]
|
||||
|
||||
for l_value, r_value in zip(left, right):
|
||||
if isinstance(l_value, list) and isinstance(r_value, int):
|
||||
r_value = [r_value]
|
||||
elif isinstance(l_value, int) and isinstance(r_value, list):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user