Uber interview question

basic python list iteration problem