Added pe7 solution in Python.