row1 = ["Date: " + date, "Price:" + price]
row2 = ["Name: " + name, "Quantity: " + quantity]
row3 = ["Title: " + title, "Owned: " + owned]
row4 = ["Type: " + type, "Value: " + value]
output_text = output_text + "\n" + \
('{:30s} {:20s}'.format(row1[0], row1[1])) + "\n" + \
('{:30s} {:20s}'.format(row2[0], row2[1])) + "\n" + \
('{:30s} {:20s}'.format(row3[0], row3[1])) + "\n" + \
('{:30s} {:20s}'.format(row4[0], row4[1])) + "\n"
print(output_text)
So, printing it to the console shows that the formatting is good, but when seeing it on the localhost website, the formatting seems to have no effect.
What's the best way to align two columns of text and have it stick on the Flask page?
Thanks