fork download
  1. import re
  2. text = 'CubsWhite Sox'
  3. print( re.sub('([A-Z][a-z]+)', r' \1', re.sub('([A-Z]+)', r' \1', text.split()[0])).split() )
Success #stdin #stdout 0.02s 9668KB
stdin
Standard input is empty
stdout
['Cubs', 'White']