Skip to content

Commit

Permalink
Use split() without parameters to split on any number of whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
loociano committed Dec 1, 2024
1 parent f9772ae commit bf1a16c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aoc2024/src/day01/python/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _parse_input(input: Sequence[str]) -> tuple[_LocationIds, _LocationIds]:
# Parse input:
for line in input: # t:O(n)
# Line format is: '<int>\s\s\s<int>'
id1, id2 = map(int, line.split(' ')) # Assumes valid input.
id1, id2 = map(int, line.split())
location_ids1.append(id1)
location_ids2.append(id2)
return location_ids1, location_ids2
Expand Down

0 comments on commit bf1a16c

Please sign in to comment.