Format commands in code

This commit is contained in:
2021-04-19 04:02:51 +00:00
parent 679030ff9a
commit bdfec0f9a4
2 changed files with 52 additions and 49 deletions
+6 -3
View File
@@ -1,4 +1,3 @@
HELP_LINES = []
with open('game.py', 'r') as f:
@@ -8,6 +7,10 @@ with open('game.py', 'r') as f:
for line in HELP_LINES:
print(line)
print()
if ' - ' in line:
command, doc = line.split(' - ')
print('`{}` - {}\n'.format(command, doc))
else:
print(line)
print()