Canonical interview question

Write a code that follows the python best practices.