def get_lines(fname):
    """Return generator with line number and line for file `fname`."""
    for line in fileinput.input(fname):
        yield fileinput.filelineno(), line.strip()
Return generator with line number and line for file `fname`.