human
Write me a code to check if the characters of a given string are in alphabetical order and the other steps required given the following:
Check if the characters of a given string are in alphabetical order | Function that checks whether the string is in alphabetical order or not.
if element at index ' i ' is less than the element at index ' i - 1' then the string is not sorted.
Driver code.
check whether the string is in alphabetical order or not"
How can the above be solved in Python?
assistant
#Here is code to check if the characters of a given string are in alphabetical order and the other steps required.
 def isAlphabaticOrder ( s ) :
	n = len ( s )
	for i in range ( 1 , n ) :
		if ( s [ i ] < s [ i - 1 ] ) :
			return False
	return True
if __name__ == " _ _ main _ _ " :
	s = " aabbbcc "
	if ( isAlphabaticOrder ( s ) ) :
		print ( " Yes " )
	else :
		print ( " No " )