MCPcopy Create free account
hub / github.com/dabeaz-course/python-mastery / headings

Method headings

Solutions/3_8/tableformat.py:24–26  ·  view source on GitHub ↗
(self, headers)

Source from the content-addressed store, hash-verified

22
23class TextTableFormatter(TableFormatter):
24 def headings(self, headers):
25 print(' '.join('%10s' % h for h in headers))
26 print(('-'*10 + ' ')*len(headers))
27
28 def row(self, rowdata):
29 print(' '.join('%10s' % d for d in rowdata))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected