Skip to content

Instantly share code, notes, and snippets.

@andreyshuster
Created August 10, 2014 05:33
Show Gist options
  • Save andreyshuster/4d6519396f6273c18f98 to your computer and use it in GitHub Desktop.
Save andreyshuster/4d6519396f6273c18f98 to your computer and use it in GitHub Desktop.
split string in chunks
s = %some string%
size = %chunk size%
[s[n:n+size] for n in xrange(0, len(s), size)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment