Get Middle Characters

A Python function that retrieves the middle character(s) from a string, contingent on the length of the string - odd or even.

Write a Python function that returns the central character(s) from a given string. If the string length is odd, it extracts the middle character. If the string length is even, it extracts the middle two characters. ### Parameters - `s` (3<=len(s)<=100, string): The input string from which the middle character(s) is to be extracted. The length of `s` would always be between 3 and 100. ### Return Value - Returns a string which is the central character(s) from the input string `s`. ### Examples ```python # 'es' is the middle two characters of 'test' central_character("test") # Returns: "es" # 't' is the middle character of 'testing' central_character("testing") # Returns: "t" # 'A' is a single-character string, therefore, the middle character is 'A' itself central_character("AAA") # Returns: "A" ```