Text Wrap

  • + 15 comments
    def wrap(string, max_width):
        return "\n".join(textwrap.wrap(string, max_width))
    

    For me this is the actual solution to the problem. So instead of modifying the template of the problem try to learn the way this tutorial is asking you to learn. Ofcourse at the end of the day you will be using what you are used to with..