Re: possible bug in while loop test

2017-09-02 Thread MRAB
On 2017-09-02 18:53, Charles Hixson wrote: python3 --version Python 3.5.3 Running on Debian stretch In this code s is a string parameter while (j < k and \ (s[j].isalnum()) or \ (s[j] in seps and s[j+1].isalnum()) ): j = j + 1 print ("i = {0}, j =

Re: possible bug in while loop test

2017-09-02 Thread Peter Otten
Charles Hixson wrote: > python3 --version > Python 3.5.3 > > Running on Debian stretch > > In this code s is a string parameter > > while (j < k and \ > (s[j].isalnum()) or \ >(s[j] in seps and s[j+1].isalnum()) ): > j = j + 1 > print ("i = {0}, j = {1

possible bug in while loop test

2017-09-02 Thread Charles Hixson
python3 --version Python 3.5.3 Running on Debian stretch In this code s is a string parameter while (j < k and \ (s[j].isalnum()) or \ (s[j] in seps and s[j+1].isalnum()) ): j = j + 1 print ("i = {0}, j = {1}, k = {2}, len[s] = {3}". \ format(i,