Не могу понять, почему в конце моего кода создается новая строка. Я хочу, чтобы код печатал авторов и * в одной строке, но по какой-то причине этого не происходит.
title = input('Enter a title for the data:')
print()
print('You entered:', title)
print()
header1 = input('Enter the column 1 header:')
print()
print('You entered:', header1)
print()
header2 = input('Enter the column 2 header:')
print()
print('You entered:', header2)
print()
author_lst = []
novel_lst = []
while (True):
author_novels = input('Enter a data point (-1 to stop input):')
print()
if ',' not in author_novels and author_novels != '-1':
print('Error: No comma in string.')
print()
continue
if author_novels == "-1":
print()
break
else:
data_point = author_novels.split(', ')
print('Author:', data_point[0])
print('Number of Novel(s):', int(data_point[1]))
author_lst.append(data_point[0])
novel_lst.append(int(data_point[1]))
print()
print('%33s' % title)
print(('%-19s' % header1), ('|'), ('%22s' % header2))
print('--------------------------------------------')
for i in range(0, len(author_lst)):
print ('%-19s' % author_lst[i], ('|'), ('%22s' % novel_lst[i]))
for i in range(0, len(author_lst)):
print("{:>20s}".format(author_lst[i]))
for i in range (novel_lst[i]):
print('*', end= '')
print()