I have a question about formatting with Python. I want to print 2 columns with the following code, but as you can see, the numbers on the second column shift on the output. Is there something I can modify to have them line up to the left?
i = 0
print ("%s %s" % ("Col1","Col2"))
while i <= 199:
print ("%s %.2f" % (i,i*2.2))
i += 30
Output:
Col1 Col2
0 0.00
30 66.00
60 132.00
90 198.00
120 264.00
150 330.00
180 396.00