Finsire Interview Question

a python assignment problem was asked