import rep = re.compile(r'([a-z])([A-Z])')test_str = "HotelCityClass"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!