



At Notion, a text utility needs a function that reverses a string. Given a string s, return a new string with the characters of s in reverse order.
ss, but in reverse orderExample 1
s = "hello""olleh"h, e, l, l, o are returned in reverse order.Example 2
s = "Python""nohtyP"Example 3
s = "a b!""!b a"0 <= len(s) <= 10^5s may contain letters, digits, spaces, and symbolss = "hello"Output"olleh"WhyEach character appears in the opposite position from the original string.s = "Python"Output"nohtyP"WhyThe string is reversed from end to start.s = "a b!"Output"!b a"WhySpaces and punctuation are reversed along with letters.0 <= len(s) <= 10^5s may contain letters, digits, spaces, and symbolsReturn a new string containing the characters in reverse orderdef reverse_string(s):