DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
8+4 =
Submit