Pregunta de entrevista de Braintrust

write a piece of Python code for a given question