Created
January 5, 2010 02:16
-
-
Save tylerharper/269083 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
output = '' | |
for line in text.split('\n'): | |
while len(line) > 80: | |
pos = line[:80].rfind(' ') | |
output = output + line[:pos] + '\n' | |
line = line[pos+1:] | |
output = output + line + '\n' | |
print output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment