input: Write a python function to convert 24-hour format time to 12-hour format time.
  assert convert24To12('09:35:00') == '9:35:00 AM'
  assert convert24To12('13:35:00') == '1:35:00 PM'
  assert convert24To12('00:15:00') == '0:15:00 AM'
  assert convert24To12('12:00:00') == '0:00:00 PM'
  assert convert24To12('23:45:00') == '11:45:00 PM'
output: def convert24To12(time24):
      hours, minutes, seconds = map(int, time24.split(':'))
      period = 'AM' if hours < 12 else 'PM'
      hours = hours % 12
      return f'{hours}:{minutes:02}:{seconds:02} {period}'