I have the following code to print a schedule from inputs but can't make the last line spread under the like the header does.
My showRecord code is as follows...
Class Appointment:
def __str__(appt):
return f'{appt.date} {appt.start} {appt.end} {appt.description} {appt.venue} {appt.priority}'
OTHER CODE UNTIL
def showRecords(schedule):
print('{:<15}{:<10}{:<8}{:<25}{:<25}{:<10}'.format("Date","Start","End","Subject","Venue","Priority")) # '<' here aligns text to left
print('{:<15}{:<10}{:<8}{:<25}{:<25}{:<10}'.format("----","-----","---","-------","-----","--------"))
for appointment in schedule:
print(appointment)
else:
print("No more appointments found.")
I have tried the following
print('{:<15}{:<10}{:<8}{:<25}{:<25}{:<10}'.format(schedule))
...and...
print('{:<15}{:<10}{:<8}{:<13}{:<11}{:<10}'.format(date, start, end, description, venue, priority))
but the last line just bunches up as follows...
I've tried several codes as noted above and can't make it work. Please help.
NOTE: I've added the rest of the code!

You can't just rely on
__str__, because it (correctly) doesn't have any padding or alignment codes in the string formatting.Nor can you rely on the padding and alignment of the headers, because that's only for the headers.
So, if you want to pad and align the text representation of an appointment, you have to do it yourself. By adding the padding and alignment formatting codes to the string being formatted and printed...