Take input for time and convert it into 24 hour time.
Implement convert_to_24_hour(time) for a valid string in hh:mm AM or hh:mm PM format. Return the equivalent zero-padded 24-hour time as HH:MM. Handle the special rules for 12 AM and 12 PM.
hh:mm AM or hh:mm PM.def convert_to_24_hour(time):