Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python split string capital letters

>>> import re
>>> re.findall('[A-Z][^A-Z]*', 'TheLongAndWindingRoad')
['The', 'Long', 'And', 'Winding', 'Road']
>>> re.findall('[A-Z][^A-Z]*', 'ABC')
['A', 'B', 'C']
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #split #string #capital #letters
ADD COMMENT
Topic
Name
6+4 =