Adding solution for problem 53 in Python.