import retest_str = ",HotelCityClass"p = re.compile(r'(\S)([A-Z])')result = re.sub(p, r"\1 \2", test_str)print(result)
Standard input is empty
, Hotel City Class
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!