Given an odd-length string (at least 5 chars), swap parts before and after the middle three characters. Example: "abcdefghi" => "ghidefabc"
Implement this function:
def swap_except_middle_three(s: str) -> str:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: s.
Input
'abcdefghi'
Output
'ghidefabc'