def read_lines(filename, begin_lineno, end_lineno):
    """Read lines from file."""
    lines = []
    with open(filename) as f:
        for i, line in enumerate(f):
            if i >= begin_lineno and i < end_lineno:
                lines.append(line.rstrip())

    return lines