Hey everyone - I'm having a bit of trouble with chapter 7 question 3. I am trying to figure out how to replace a character within an array, modifying the existing array.
I can change the characters of a string with the index like this:
So that doesn't do what I want it to. I've tried converting the array element into a string as well but that just gives me a string with the array brackets and the actual string inside that:
Hey everyone - I'm having a bit of trouble with chapter 7 question 3. I am trying to figure out how to replace a character within an array, modifying the existing array.
I can change the characters of a string with the index like this:
However, I can't figure out how to do the same thing if the string is in an array. I thought it would be something like this:
So that doesn't do what I want it to. I've tried converting the array element into a string as well but that just gives me a string with the array brackets and the actual string inside that:
Any help much appreciated!