I would like to divide list items inside two lists.
a = [[1, 0, 2], [0, 0, 0], [1], [1]]
b = [[5, 6, 4], [6, 6, 6], [3], [3]]
How can I divide a by b to obtain this output:
c = [[0.2, 0, 0.5], [0, 0, 0], [0.333], [0.333]]
Can anyone help me?
Using
itertools.izip
(Python2.7):