MCPcopy Create free account
hub / github.com/ActiveState/code / format_HST

Function format_HST

recipes/Python/502267_Marks_Game/recipe-502267.py:127–134  ·  view source on GitHub ↗
(database)

Source from the content-addressed store, hash-verified

125 return SAMPLE_HST
126
127def format_HST(database):
128 # Format HST database to string.
129 lines = []
130 for key in sorted(database.keys(), reverse=True):
131 score = ' ' + str(key)
132 for name in database[key]:
133 lines.append((name[:MAX_NAME_WIDTH] + ' ').ljust(HST_WIDTH - len(score), HST_SEP) + score)
134 return '\n'.join(lines)
135
136################################################################################
137

Callers 1

high_score_tableFunction · 0.70

Calls 5

strFunction · 0.85
sortedFunction · 0.50
keysMethod · 0.45
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected