a=1+2
import csv
all_items=[]
with open('stockes.csv') as product:
stockes=csv.reader(product)
for row in stockes:
all_items.append(row)
print(all_items[1][2])
all_items([1],[2]).append(a)
抱歉,但是a代替了我的正常变量,这也是我的第一个问题
答案 0 :(得分:0)
列表是 [['条形码','名称','股票','奖品'],[' 13245627', '普通括号',' 3',' 599'],[' 12345670',' 100 mm螺栓', ' 7',' 550'],[' 56756777',' L形括号',' 8', ' 230']]
a=1+2
import csv
all_items=[]
with open('stockes.csv') as product:
stockes=csv.reader(product)
for row in stockes:
all_items.append(row)
print(all_items[1][2])
all_items([1][2]).append(a)
抱歉,我希望这更好