Apple interview question

Python coding tricks, basic ML/Stats problems