Pergunta de entrevista da empresa Happiest Minds Technologies

asked to solve 2 problems in python