Apr-30-2017, 07:11 PM
Depending on file size, most common approach would be to open the file and read all of its content in memory, in some data structure (most probably - dict, using GTIN code as key). Then you can check if the product number that user has entered is in the dict.
if it is csv file, you may use csv module for convenience.
if it is csv file, you may use csv module for convenience.