Looping over the string characters and finding strings less than that character
for i in range ( length ) : NEW_LINE INDENT count += ( ( ord ( s [ i ] ) - ord ( ' a ' ) ) * pow ( 26 , length - i - 1 ) ) NEW_LINE DEDENT return count NEW_LINE