I have a list with some book names and their authors, but I want it to look organized, so I want it to take the book title, then complete it with spaces so it ends up with 100 characters, independent of the length of the book title. It would, then, add the book title.
So far I've tried this:
for i in range(0, len(bookList)):
t = 100 - len(bookList[i])
numbofspaces = ""
for j in range(0, t):
numbofspaces += " "
s.append(bookList[i] + numbofspaces + authorList[i])
When I tried it in the python shell it worked pretty well, but when it takes the titles from the list, it doesn't work, why is that?