UST interview question

Technical questions from core python