Advertisement
rfmonk

textwrap_fill_width.py

Dec 30th, 2013
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. import textwrap
  4. from textwrap_example import sample_text
  5.  
  6. dedented_text = textwrap.dedent(sample_text).strip()
  7. for width in [45, 70]:
  8.     print '%d Columns:\n' % width
  9.     print textwrap.fill(dedented_text, width=width)
  10.     print
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement