Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

checking if a string is in alphabetical order in python

def isInAlphabeticalOrder(word):
    for i in range(len(word) - 1):
        if word[i] > word[i + 1]:
            return False
    return True
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #checking #string #alphabetical #order #python
ADD COMMENT
Topic
Name
3+9 =