MathWorks Interview Question

Tested on python iterators, map functions.