Deloitte Interview Question

Puzzle problem, a simple coding question, questions on python language