Here's an example of what I have now:
car_Sales = [] #for loop goes here with user inputted stuff appended into the list. print "Car sales by quarter: %8s %6s %6s %6s" %(car_Sales[0], car_Sales[1], car_Sales[2], car_Sales[3])
I would like to condense it in a for loop, having something like print "Car sales by quarter: %8s", %car_Sales[i]
all on one line. So it would be displayed like:
Car sales by quarter: 25 53 78 98
The other problem I have is the formatting. I'm trying to get the 1st element printed to be justified 8 spaces over, while the rest just have 6.
Any help would be greatly appreciated!

New Topic/Question
Reply



MultiQuote






|