Reverse Word Characters

String Manipulation Beginner Coding Developer

Reverse Word Characters

Write a function that takes a sentence as input and returns a new sentence in which the characters of each word are reversed, while the word order remains the same.

For example:

  • Input: "Hello, World!"
  • Output: ",olleH !dlroW"

Notes:

  • Treat punctuation as part of the word.
  • For the purpose of this problem, assume words are separated by spaces.

In honor of Shakespeare Day (April 23rd), challenge yourself to play with words just as the Bard did with language!

Function Signature Requirements:

  • The function should accept a single string as an argument.
  • The function should return a string as the result.

Happy coding!