#Need help with removing certain characters from a str (Any help appreciated thank you!)

3 messages · Page 1 of 1 (latest)

next scaffold
#

Hey everyone, so this short program I wrote makes it so that when you enter a string, it will output it backwards with certain characters attached, and I tried to enter more than one word, but the output is incorrect, I feel like I need one more line of code but can't figure it out, the problem is there should be no Hyphens - before any characters, only between them, could anyone help me out, much appreciated thank you 🙂 ( IN the output attached, there shouldn't be a - before the T or H.

zenith cave
#

Could change the code slightly to split by space , reverse the array and do each word one at a time

#

That way you only add "-" when manipulating the word