primesum in python