I've written this program in Python 3 that takes a CSV file that finds the min and max death rates for particular states.
I've basically finished the program and it outputs correctly in the shell, but I have a problem:
- Different states have different lengths of characters in their names and the spacing does come out correctly, how do I use string formatting to make the strings space evenly regardless of the number of characters printed?
Here is what I have:
print ("\n", "Indicator |", "Min ",
" | Max ")
print ("-----------------------------------------------------------------------------------------------")
This is the output:
It works well for "Minnesota" but for "District of Columbia" it doesn't format evenly.
Any suggestions? Thanks.