refactor format_and_print()

This commit is contained in:
onyx-and-iris 2024-01-16 17:19:45 +00:00
parent 74ada2f373
commit 0d991c54b9
4 changed files with 5 additions and 6 deletions

2
.gitignore vendored
View File

@ -158,3 +158,5 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
words_alpha.txt

View File

@ -44,8 +44,7 @@ def format_and_print(table):
if i == 0:
continue
row[0] = items[i - 1].name
table[0] = [i for i in range(W + 1)]
table[0][0] = None
table[0] = [None, *[i for i in range(1, W + 1)]]
# print tabularised 2D array
logger.info([item.name for item in items])

View File

@ -44,8 +44,7 @@ def format_and_print(table):
if i == 0:
continue
row[0] = items[i - 1].name
table[0] = [i for i in range(W + 1)]
table[0][0] = None
table[0] = [None, *[i for i in range(1, W + 1)]]
# print tabularised 2D array
logger.info([item.name for item in items])

View File

@ -44,8 +44,7 @@ def format_and_print(table):
if i == 0:
continue
row[0] = locations[i - 1].name
table[0] = [i / 2 for i in range(2 * (W + 1) - 1)]
table[0][0] = None
table[0] = [None, *[i / 2 for i in range(1, 2 * (W + 1) - 1)]]
# print tabularised 2D array
logger.info([item.name for item in locations])