Bloomberg interview question

python question