Bit more style with this version (reads better) - but essentially same solution I gave.
Bit more style with this version (reads better) - but essentially same solution I gave.

JDFagan/InterviewInPython