On Sun, 7 Feb 2021 20:49:52 +0000 (UTC), Kevin M. Wilson wrote:

> Set i = 0 at the begin of the code, that way each entry starts at
> Logical 0 of the array/container/list...

No.  The original code, as posted, was

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

Setting i=0 before the "for" statement would make no difference.
In the first pass through the for loop, i is set to the first
value in the range, which is zero.



-- 
To email me, substitute nowhere->runbox, invalid->com.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to