Skip to content

Instantly share code, notes, and snippets.

@torkildr
Created March 25, 2011 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torkildr/886568 to your computer and use it in GitHub Desktop.
Save torkildr/886568 to your computer and use it in GitHub Desktop.
>>> str="xxxxxx yyyyyyyyyy zzzzzzz"
>>> "".join(["%-40s" % x for x in str.split()])
'xxxxxx yyyyyyyyyy zzzzzzz '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment