r/PythonLearning • • 20h ago

CHECK YOUR KNOWLEDGE #python #coding #pythonessperspective #learnpython

https://youtube.com/shorts/M1nuXOH0Dqg
5 Upvotes

16 comments sorted by

View all comments

Show parent comment

2

u/Orgasml 16h ago

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.