<qiyuangong>541_Reverse_String_II_2.py
def reverseStr( s: str, k: int) -> str:
    s = list(s)
    for i in range(0, len(s), 2*k):
        s[i:i+k] = reversed(s[i:i+k])
    return "".join(s)
def sample_funcname ( var_0 : str , var_2 : int ) -> str :
    var_0 = list ( var_0 )
    for var_9 in range ( 0 , len ( var_0 ) , 2 * var_2 ) :
        var_0 [ var_9 : var_9 + var_2 ] = reversed ( var_0 [ var_9 : var_9 + var_2 ] )
    return "".join ( var_0 )
