Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

split a string with 2 char each in python

a_string = "abcde"

n = 2
split_strings = [a_string[index : index + n] for index in range(0, len(a_string), n)]
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #split #string #char #python
ADD COMMENT
Topic
Name
7+4 =