Traverse the alphaIndex array lesser than the index of first character of given string
rank = - 1 NEW_LINE for i in range ( 26 ) : NEW_LINE INDENT if ord ( ' a ' ) + i >= ord ( s [ 0 ] ) : NEW_LINE INDENT break NEW_LINE DEDENT DEDENT