Added a Python 3 solution.