Reverse a string without using built-in library functions.
Implement the function reverse_string(s) to return the characters of s in reverse order. Do not use slicing, reversed(), .reverse(), or any library function specifically designed to reverse a string.
Input is a string, and output must be a new string containing the characters in reverse order. Preserve spaces, punctuation, letter casing, and repeated characters.
reversed(), .reverse(), or a dedicated string-reversal library functiondef reverse_string(s):