add charater to string code example
Example 1: how to add char to string python
def addChar(text,char,place):
return text[:place] + char + text[place:]
Example 2: how to add a character to a string in java
// Define a character
char ch='A';
// Define a string
String str="pple";
str= ch+str; // str will change to "Apple"