How to convert several lists to a list of dicts in python?
You can zip
the lists you are interested in to dict
s with list comprehension
l = [{'initial_num': x, 'after_borrow': y, 'state': z, 'after_subtract': k} for x, y, z, k in zip(o, a, state, c)]