Pregunta de entrevista de L&T Technology Services

Python coding question to solve