I was wondering about my apparently code for an MIT online edx class practice problem vs the provided answer code.
The assignment in question from the class was
or, in one pass and without the overhead of string concatenation:
length, start, stop, i = len(s), 0, 0, 0 while i < length: j = i+1 while j < length and s[j] >= s[j-1]: j += 1 if j - i > stop - start: start, stop = i, j i = j print(s[start:stop])