Broadcom interview question

programming in Python programming language