Load a text file as an array of lines.

    Args:
        filename: Path to the input file.

    Returns:
        An array of strings, each representing an individual line.

def load_lines(filename):
    """
    Load a text file as an array of lines.

    Args:
        filename: Path to the input file.

    Returns:
        An array of strings, each representing an individual line.
    """

    with open(filename, 'r', encoding='utf-8') as f:
        return [line.rstrip('\n') for line in f.readlines()]