#Skip to menu

Power digit sum

First read the problem description.
digit_sum = 0
n = 2**1000
while n > 0:
    digit_sum += n % 10
    n //= 10
digit_sum
1366

Source code of the solution(s):