0

Hi all

I'm needing help with a question in my tutorial due tomorrow...

I'm given this file which contains the following:

toy201, Racing Car, AB239:2,DC202:2,FR277:2,JK201:1,YU201:1,EE201:1,FW201:1

toy101, Barbie Doll, AB139:2,DC102:2,FR177:2,JK101:1,YU101:1,EE101:1,FW101:1

toy301, Flying Kite, AB339:2,DC302:2,FR377:2,JK301:1,YU301:1,EE301:1,FW301:1

I am now to define a function that gives the following from the above file:

>>>load_prods(filename)

{'toy301': ('Flying Kite', [('AB339',2),('DC302',2),('FR377',2),('JK301),1),('YU301',1),('EE301',1),('FW301),1)])

.......(and the same for barbie doll and flying kite)........ }

Any help would be greatly appreciated...