python - How do I make my program give me the value of a certain cell in a CSV? -
i having problems trying make program find cell in csv file. program ask 8 digit number. if in csv file, row should written text file. should proceed ask user how of product want buy. quantity multiplied give final price. price written variable named totalprice. my initial problem quantity since cannot retrieve third column of row of entered gtin-8 number in csv file. my code is: import csv import sys import re import os additem = "" gtinnum = "" quantity = 0 totalprice = 0 restart = "" f = open("chocolatecsv.csv", "rt") def restart(): restart = input("would restart? y/n") if restart.lower() == "y": gtinquestion() else: print(receiptcont) sys.exit() def quantityquestion(): quantity = input("how like?") def scangtin(): global rows rows = re.split('\n', f.read()) global receiptcont receiptcont = receipt.read() index, row in e