yet another python solution

Python Solution