Skip to content

Instantly share code, notes, and snippets.

@thomasballinger
Created November 18, 2013 03:39
Show Gist options
  • Select an option

  • Save thomasballinger/7522081 to your computer and use it in GitHub Desktop.

Select an option

Save thomasballinger/7522081 to your computer and use it in GitHub Desktop.
Three ways to wrap text
>>> wrap('hello there', 5)
['hello',
'there']
>>> wrap('home is where the heartwrenching angst is', 10)
['home is',
'where a',
'heartwrenc', #1
'hing',
'angst is']
['home is',
'where a',
'heartwrenc', #2
'hing angst',
'is']
['home is',
'where a he',
'artwrenchi', #3
'ng angst',
'is']
@thomasballinger
Copy link
Author

Going with #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment