code: def tabulate(lol, headers, eol='\n'):
      
      yield '| %s |' % ' | '.join(headers) + eol
      yield '| %s:|' % ':| '.join(['-' * len(w) for w in headers]) + eol
      for row in lol:
          yield '| %s |' % '  |  '.join(str(c) for c in row) + eol
docs: Use the pypi tabulate package instead!