Amtex Systems interview question

Asked python related