PE Problem 27 Python

Solution for PE Problem 27 (Python)
Needs to be optimized, runs in ~38 seconds on home machine