diff --git a/main.py b/main.py index 0d1f17b..1c96be2 100644 --- a/main.py +++ b/main.py @@ -2,7 +2,8 @@ def path_to_file_list(path: str) -> List[str]: """Reads a file and returns a list of lines in the file""" - li = open(path, 'w') + with open(path, 'r') as file: + lines = file.read().splitlines() return lines def train_file_list_to_json(english_file_list: List[str], german_file_list: List[str]) -> List[str]: