Create a function that converts 12-hour time to 24-hour time or vice versa. Return the output as a string.
convert_time("12:00 am") ➞ "0:00" convert_time("6:20 pm") ➞ "18:20" convert_time("21:00") ➞ "9:00 pm" convert_time("5:05") ➞ "5:05 am"