Sentence Case of a given Camel cased string | Function to return the original string after converting it back from camelCase ; Print the first character as it is ; Traverse the rest of the characters one by one ; If current character is uppercase prspace followed by the current character in lowercase ; Else print the current character ; Driver code
def getOrgString ( s ) : NEW_LINE INDENT print ( s [ 0 ] , end = " " ) NEW_LINE i = 1 NEW_LINE while ( i < len ( s ) ) : NEW_LINE INDENT if ( ord ( s [ i ] ) >= ord ( ' A ' ) and ord ( s [ i ] ) <= ord ( ' Z ' ) ) : NEW_LINE INDENT print ( " ▁ " , s [ i ] . lower ( ) , end = " " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( s [ i ] , end = " " ) NEW_LINE DEDENT i += 1 NEW_LINE DEDENT DEDENT s = " ILoveGeeksForGeeks " NEW_LINE getOrgString ( s ) NEW_LINE