As far as I know there is no built in method that allows you to chunk an str every x indices. However this should works:
str = "stringStringStringString"
def chunk_str(str, chunk_size):
return [str[i:i+chunk_size] for i in range(0, len(str), chunk_size)]
chunk_str(str,3)
produces:
['str', 'ing', 'Str', 'ing', 'Str', 'ing', 'Str', 'ing']