Bloomberg Interview Question

python question