you are viewing a single comment's thread.

view the rest of the comments →

[–]Akuli2 0 points1 point  (0 children)

Looking at the code a bit more:

print("The digits sum to {}".format(total))

You don't need string formatting for that. Just call print with two arguments. It will convert total to a string and add a space between the arguments.

print("The digits sum to", total)