Python's `str.splitlines()` method offers a clean way to read a file into a list of lines without manually stripping newline characters. By combining `pathlib` with `read_text().splitlines()`, you get a concise one-liner that handles config files, log files, and other text files cleanly.

•1m watch time