>>> pow (20,5,3) 2 >>> pow(20,5)%3 2 >>> pow(20,5)-(pow(20,5)/3)*3 2 It returns the remainder you get when you divide by the third argument the power specified by the first two arguments. You can compute the power faster if you know that you're only going to need that remainder in the end. Alex.