Table Printer - Ch. 6 Practice Project

preview_player
Показать описание
Комментарии
Автор

Your videos are always helpful to me specifically 👍🏼

wasikasteven
Автор

It was really helpful as I was stuck at this for a long time. By the way, do you post codes on GitHub, StackOverflow, or any other place? Or are you on discord?
By the way, I was confused over the empty print in the first for loop so I did some research. I found a different method that seems the same to me. If anyone would like to check it out.

for stringIndex in range(listLength):

for listIndex in range(len(table)):

string = table[listIndex][stringIndex]

if listIndex < (len(table) - 1):
print(string.rjust(colsWidths[listIndex]), end = ' ')
else:


In the previous code, the print statement takes the end = ' ' and creates an empty string/line at the end of our string.
I hope this helped in any way. It was really simple as you said. It only takes 4-5 lines of code to solve such a big problem which stole a few of my nights. Again, thanks for posting this video.

vrajparmar