Using Python I need to insert a newline character into a string every 64 characters. In Perl it's easy:
s/(.{64})/$1
/
How could this be done using regular expressions in Python? Is there a more pythonic way to do it?
See Question&Answers more detail:os