Can one character of a string variable be changed?
For instance, if # "o" is in position 1, can I change position 1 to something else? Basically, I'm asking for user to input a word via
word = input("Please enter your favorite word: ")
Then I'm taking that word variable, and I'd like to parse it down letter by letter. Then I'm trying to change each letter to different things using if then or for i in range.
So I'm trying to do something like
word[0] = "a" word[1]="b"
then I have to run the different scenarios down based on the if then/for i.
Maybe
if word[1] = "b" then word[1]="c"
Then I recompile the word with changes. Can that be done, or am I thinking about this wrong?