day13 - remember the f'ing zip()! It's not *that* hard ...

This commit is contained in:
Stefan Harmuth 2022-12-13 07:56:40 +01:00
parent a6b88855c8
commit 082a65b36b

View File

@ -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):