I am trying to format the string so everything lines up between the two.
APPLES $.99 214
kiwi $1.09 755
I am trying this by doing:
fmt = ('{0:30}{1:30}{2:30}'.format(Fruit,price,qty))
How would I get a column to line up? I read the docs but I am confused. I was thinking that the {1:30}
would make it 30 spaces, then it would print the next item, but it appears that it is 30 spaces from where the previous item ended.
Thanks
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…