def fill(text, indent, heading=None):
sub = indent * " "
if heading:
init = (indent - 2) * " " + heading + " -- "
else:
init = sub
w = textwrap.TextWrapper(initial_indent=init, subsequent_indent=sub)
return w.fill(" ".join(text.split()))
评论列表
文章目录