$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · medium · #282

What goes in the blank?

# sum of the digits of n
total = 0
while n > 0:
    total += n % 10
    n ____= 10

Answer: // (also accepted: //)

n % 10 reads the last digit and n //= 10 drops it; /= would turn n into a float.
Play Problem Solving ▸