I'm this close to running a command line python instance just to test this because there's no chance in HELL total returns a string. But I'm also a little skeptical about how a double nested for loop iterating over the same string will return 100. It's genuinely the only thing that makes sense, but I need to see it to believe it.
The first loop runs ten times (10 chars in the string), the embedded loop runs 10 times each time the first loop goes around and adds to 1 total. Making it add 1 to total 10x10 times, or 100 times.
1
u/svanidzelal 4h ago
A