import remystr = 'HelloWorldToYou'pat = re.compile(r'[A-Z][a-z]*')print [x.group() for x in pat.finditer(mystr)]
Standard input is empty
['Hello', 'World', 'To', 'You']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!