I am trying to make/get a new string which doesn't contain spaces. For example,
string1 = "my music is good"
should become
joinedstring = "mymusicisgood" #this is the one i want
At first i was able to do this by using the built in string method
string1 = "my music is good"
joinedstring = string1.replace(" ","")
But now I am trying to achieve the same results without any string method, which means I have to make my own function. My thought was to make a loop which searches for the index of the "space" in a string then try to delete indexes to make a new string.
But here comes the problem, strings are immutable so deleting say del string[index] doesn't work. Any help please!