How to print string in this way

Posted by xRobot on Stack Overflow See other posts from Stack Overflow or by xRobot
Published on 2010-06-14T06:08:30Z Indexed on 2010/06/14 6:12 UTC
Read the original article Hit count: 131

Filed under:

For every string, I need to print # each 6 characters.

For example:

example_string = "this is an example string. ok ????"

myfunction(example_string)

"this i#s an e#ample #string#. ok ?#???"

What is the most efficient way to do that ?

© Stack Overflow or respective owner

Related posts about python