Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python split word into letter pairs

s = 'abcdef'
L = zip(s[::2], s[1::2])
# -> [('a', 'b'), ('c', 'd'), ('e', 'f')]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #split #word #letter #pairs
ADD COMMENT
Topic
Name
9+5 =