Loads given text file with separate lines into list of string. Args: file_path: file path Returns: flat list of string
(file_path: str)
| 241 | |
| 242 | |
| 243 | def load_file(file_path: str) -> List[str]: |
| 244 | """ |
| 245 | Loads given text file with separate lines into list of string. |
| 246 | |
| 247 | Args: |
| 248 | file_path: file path |
| 249 | |
| 250 | Returns: flat list of string |
| 251 | """ |
| 252 | res = [] |
| 253 | with open(file_path, "r") as fp: |
| 254 | for line in fp: |
| 255 | res.append(line) |
| 256 | return res |
| 257 | |
| 258 | |
| 259 | def write_file(file_path: str, data: List[str]): |
no outgoing calls
no test coverage detected
searching dependent graphs…