Using Python I need to insert a newline character into a string every 64 characters. In Perl it\'s easy:
s/(.{64})/$1\\n/
How could this be
I'd go with:
import textwrap s = "0123456789"*100 print '\n'.join(textwrap.wrap(s, 64))