首页 > 其他 > 详细

textwrap模块

时间:2020-04-09 12:57:24      阅读:52      评论:0      收藏:0      [点我收藏+]

fill  将多行文本按照指定的宽度和格式输出

s = "Look into my eyes, look into my eyes, the eyes, the eyes, the eyes, not around the eyes, don‘t look around the eyes, look into my eyes, you‘re under."

import textwrap
print(textwrap.fill(s, 70))
print(textwrap.fill(s, 40, initial_indent=    , subsequent_indent=    ))

 

textwrap模块

原文:https://www.cnblogs.com/wc89/p/12666053.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!