16 lines
450 B
Python
16 lines
450 B
Python
from pathlib import Path
|
|
|
|
|
|
def get_lists(data_file: Path) -> tuple[list[int], list[int]]:
|
|
list1 = []
|
|
list2 = []
|
|
for line in data_file.open():
|
|
numbers = line.strip().split(" ")
|
|
list1.append(int(numbers[0]))
|
|
list2.append(int(numbers[1]))
|
|
return list1, list2
|
|
|
|
|
|
def get_ordered_lists(data_file: Path) -> tuple[list[int], list[int]]:
|
|
list1, list2 = get_lists(data_file)
|
|
return sorted(list1), sorted(list2)
|