Write a function @replacement(f, g)@ that provided two integer lists and returns the list obtained after replacing the zeros in list with values in . First zero has to be replaced with the first number in , the second zero with the second number in and so on, until there are no more zeros in or there are no more available numbers in . When values in have been exhausted no more replacements are done. Lists and do not have to change.
>>> replacement([1, -1, 0, 2, 0], [3, -2, 1]) [1, -1, 3, 2, -2] >>> replacement([1, -1, 0, 2, 0], [5]) [1, -1, 5, 2, 0] >>> replacement([1, -1, 0, 2, 0], [0]) [1, -1, 0, 2, 0] >>> replacement([1, -1, 0, 2, 0], []) [1, -1, 0, 2, 0] >>> f, g = [0, 0, -1, 0, 0], [2, 5, 3] >>> replacement(f, g) [2, 5, -1, 3, 0] >>> f == [0, 0, -1, 0, 0] and g == [2, 5, 3] True