I need a small tool to print a record layout with a row of data to proof the layout and data match. To that end, I am using a CSV to pick up a record, and a list to store the field names.
What I want to do is to pick up a field name, and a field of data and combine them to print; "Field:data".
I thought looping through the list, then sub looping through the record would work
for item in list: for field in record: print item + ': ' + field
This does not work, it produces 'Item: field field field filed' becasue it completes the sub loop first before returning to the item list.
I was thinking of feeding both to a key pair. Anyone have an obvious idea that's ecscaping me?