Think Python Python Exercises, Practice, Solution - w3resource