def wc_l(inp):
    """Output number of lines in file or stream"""
    if isinstance(inp, str):
        with open(inp) as f:
            v = wc_l(f)
        return "{} {}".format(v, inp)
    else:
        return sum(1 for x in inp)