Fractal Generator in python