<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def zlines(f = None, sep = "\0", osep = None, size = 8192):
 # {{{1 """File iterator that uses alternative line terminators."""

  if f is None: f = sys.stdin
  if osep is None: osep = sep
  buf = ""
  while True:
    chars = f.read(size)
    if not chars: break
    buf += chars; lines = buf.split(sep); buf = lines.pop()
    for line in lines: yield line + osep
  if buf: yield buf