At Apple, a text-processing utility needs a simple helper to reverse user-entered strings. Write a function that takes a string and returns a new string with the characters in reverse order.
ss, but in reverse orderYour solution should work for empty strings, strings with spaces, punctuation, digits, and mixed case characters.
Example 1
Input: s = "hello"
Output: "olleh"
Explanation: The characters are returned from last to first.
Example 2
Input: s = "Swift 5"
Output: "5 tfiwS"
Explanation: Spaces and digits are treated like any other character and are also reversed.
Example 3
Input: s = ""
Output: ""
Explanation: Reversing an empty string still produces an empty string.
0 <= len(s) <= 10^5s may contain letters, digits, spaces, and punctuation