This process is similar to binary - to - decimal conversion
result = 0 ; NEW_LINE for B in range ( len ( s ) ) : NEW_LINE INDENT result *= 26 ; NEW_LINE result += ord ( s [ B ] ) - ord ( ' A ' ) + 1 ; NEW_LINE DEDENT return result ; NEW_LINE