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

Method headings

Solutions/7_6/tableformat.py:23–25  ·  view source on GitHub ↗
(self, headers)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected