Improving efficiency for finding longest contiguous non-decreasing substring
Your algorithm is basically fine, but it is expressed in the code clumsily.

The biggest problem is the interface of the function: it should accept a string parameter and return a string.  Instead, your function takes s from its environment and uses the global variable largest to store the answer.  Although there is a return largest statement, it is very misleading.  What actually happens is that s[index] raises an IndexError, so that the return largest is never reached, and the answer is passed back using the global variable instead.

The root cause for the IndexError is that there are too many variables, causing confusion.  With each iteration through the loop, you increment index, prev_index, and count.  That means that those three variables could be reduced to one, which could just be called i.  (If you think about it, you'll find that count is always one less than index.  Since the loop condition is count &lt; len(s), s[index] will go one position beyond the end of the string.)

The next observation to make is that your if and elif blocks are almost identical.  You can combine them by using &gt;= for the test.

Python strings are immutable, so largest = test[:] could just be largest = test.

Putting everything together…

def longest_nondecreasing_substring(s):
    if s is None or len(s) &lt;= 1:
        return s

    longest = test = s[0]

    for i in range(1, len(s)):
        if ord(s[i]) &gt;= ord(s[i - 1]):
            test += s[i]
        else:
            if len(longest) &lt; len(test):
                longest = test
            test = s[i]
    if len(longest) &lt; len(test):
        longest = test
    return longest