Pergunta de entrevista da empresa Anheuser-Busch InBev

Coding interview in python. Explain the code you have done