Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how split string in python by size

>>> x = "qwertyui"
>>> chunks, chunk_size = len(x), len(x)/4
>>> [ x[i:i+chunk_size] for i in range(0, chunks, chunk_size) ]
['qw', 'er', 'ty', 'ui']
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #split #string #python #size
ADD COMMENT
Topic
Name
2+6 =