Imlpementation of project euler taks in python