def insert_newlines(string, every=64):
    lines = []
for i in range(0, len(string), every):
    lines.append(string[i:i + every])
return '\n'.join(lines)
Insert a newline character every 64 characters using Python