Python cannot count apparently

Philipp Daher pa.daher at icloud.com
Sun Feb 7 14:34:34 EST 2021


Hello,

I recently coded this snippet of code:
myString=„hello“
for i in range(len(myString):
     print(string[i])

And now for the weird part:

SOMETIMES, the output is this:

hello

And SOMETIMES, the output changes to:

ohell

WHY??? Why do I get different outputs with the EXACT SAME CODE?

Can someone help me please? Thank you


More information about the Python-list mailing list