How can I remove the X’s from the garbled string?
We may be able to get away with just not printing the X’s, rather than going through all the trouble of deleting them and them making a new string!
Remember, to start a list slice at the end of a string and traverse to the beginning, we simply write nothing for the
end indexes, and then make our
stride index negative by the amount we want to traverse at each step.
my_string[::-3] would give us every third character in
my_string. The code for getting every other character is very similar!