<doocs>1974.Minimum Time to Type Word Using Special Typewriter_1.py
def minTimeToType( word: str) -> int:
    ans = prev = 0
    for c in word:
        curr = ord(c) - ord('a')
        t = abs(prev - curr)
        t = min(t, 26 - t)
        ans += t + 1
        prev = curr
    return ans
def sample_funcname ( var_0 : str ) -> int :
    var_5 = var_3 = 0
    for var_6 in var_0 :
        var_9 = ord ( var_6 ) - ord ( 'a' )
        var_11 = abs ( var_3 - var_9 )
        var_11 = min ( var_11 , 26 - var_11 )
        var_5 += var_11 + 1
        var_3 = var_9
    return var_5
