Python textwrap Library - How to Preserve Line Breaks?

后端 未结 8 949
礼貌的吻别
礼貌的吻别 2021-02-04 02:19

When using Python\'s textwrap library, how can I turn this:

short line,

long line xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
         


        
8条回答
  •  名媛妹妹
    2021-02-04 02:57

    It looks like it doesn't support that. This code will extend it to do what I need though:

    http://code.activestate.com/recipes/358228/

提交回复
热议问题