我正在创建一个需要读取文件的程序,如果文件中有某个数字,我想要它打印它需要重新进货。
table=[[gtin1[0][0], "re-stocking level"]]
#check for zero
for i in range (len(gtin1)):
if int(gtin1[i][3])<=0:
item=[gtin1[i][0],gtin1[i][1]]
table.append(item)
print tabulate(table,headers="firstrow")
This is the table
Gtin-8 Product description Quinty Price total
-------- --------------------- -------- ------- -------
12345670 red cars 2 0.5 1