Frappe._dict(zip(row_template, row))

Hi,
Wht does this code do?

frappe._dict(zip(row_template, row))

what is the context. should not be too hard to find out.

The above code was applied as in stock_reconciliation.py
I have used it successfully and is assuming it converts a json block to a doctype format?
I needed to iterate though a json block which was saved from a csv file , just like in stock_reconciliation

row_template = ["item_code", "warehouse", "qty", "valuation_rate"]
if not self.reconciliation_json:

data = json.loads(self.reconciliation_json)
for row_num, row in enumerate(data[data.index(self.head_row)+1:]):
row = frappe._dict(zip(row_template, row))
row["row_num"] = row_num
In [1]: a = ['a', 'b', 'c']
In [2]: b = [1, 2, 3]
In [3]: dict(zip(a, b))
Out[3]: {'a': 1, 'b': 2, 'c': 3}

@pdvyas ty
Clear now