import re print(re.sub(r'(?i)[A-Z](?=[A-Z])', '\g<0> ', 'BINGO!'))
Standard input is empty
B I N G O!
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!