如何去除由数字10~12造成的压痕,直到第9个数字是好的,因为没有压痕造成的数字。你知道吗
mList = [" Ganja Masta"," Chicken"," Supreme"," Hawaiian"," God Father"," Double Cheese"," Vegetarian"," Meat Lovers"," Beef and BBQ","Fire Breather","Mr Wedge","Double Bacon"]
pList = [8.50,8.50,8.50,8.50,8.50,8.50,8.50,13.50,13.50,13.50,13.50,13.50]
qList = [0,0,0,0,0,0,0,0,0,0,0,0,0]
tList = [0,0,0,0,0,0,0,0,0,0,0,0]
cList = ["Delivery","delivery","Pickup","pickup","PickUp","pick-up","Pick-up","Pick-Up"]
dList = ["Delivery","delivery"]
print("Code No Item Price Quantity Item Total")
print("=======================================================================")
for count in range(len(mList)):
print("{0} {1:<15} ${2:>5.2f} {3:>5} ${4:>5.2f}".format(count+1,mList[count],pList[count],qList[count],tList[count]))
您已经在使用string formatting;只需为第一项指定宽度。你知道吗
应产生:
只需打印表格:
相关问题 更多 >
编程相关推荐