Adding a Substring to a String without knowing the position
I want to add a char(newline) to a String by specifiying the location with a Substring. Is that possible in Python or Java? Here’s how I imagine it, Newline is added to the String at the position between two arrays ‘],’: str = [[a,b,c], [d,e,f]] result = addString(str, ‘],’, ‘\n’) print(result) Output: [[a,b,c], [d,e,f]] >Solution… Read More Adding a Substring to a String without knowing the position