
Given a string s, return a new string with the characters of s in reverse order. The input is a Python string, and the output should also be a string. Do not use built-in reverse helpers that solve the entire problem in one step.
Example 1:
Input: s = "hello"
Output: "olleh"
Explanation: The characters are returned from right to left.
Example 2:
Input: s = "Zensar"
Output: "rasneZ"
Explanation: Every character changes position symmetrically around the center.
0 <= len(s) <= 10^5s may contain letters, digits, spaces, and punctuations = "hello"Output"olleh"WhyThe first and last characters swap, then the second and second-last swap.s = "abcde"Output"edcba"WhyAll characters appear in the exact opposite order.0 <= len(s) <= 10^5s may contain letters, digits, spaces, and punctuationReturn a string of the same length as the inputdef reverse_string(s):