- 6

Please help me in finding answer for this question

Considering the following definition of Dictionary PRODUCT, write a function in Python to search the content in a pickled file "SUPERMARKET.DAT", Where PTYPE key of the dictionary is matching with the value “GROCERY“ and STOCK is 300 to 400, and copy such records onto another file “Temp.dat”. PRODUCT ={‘PNO’:____, ‘PNAME’:____, ‘PTYPE’:_____ , ‘STOCK’: ______}

28th Jul 2021, 7:58 AM
Anrs
Anrs - avatar
1 Answer
+ 2
Anrs As this question is 3 weeks old, I first wanted to ask if you already solved the problem. If this should not be the case, I wanted to know if you created the SUPERMARKET.DAT file yourself and if you could send an example or sample of the file.
19th Aug 2021, 6:43 AM
Maisu
Maisu - avatar