from datetime import datetime


def time_converter(time):

    return datetime.strptime(time.upper().replace('.', ''), '%I:%M %p').strftime('%H:%M')


if __name__ == '__main__':
    print("Example:")
    print(time_converter('12:30 p.m.'))

    #These "asserts" using only for self-checking and not necessary for auto-testing
    assert time_converter('12:30 p.m.') == '12:30'
    assert time_converter('9:00 a.m.') == '09:00'
    assert time_converter('11:15 p.m.') == '23:15'
    print("Coding complete? Click 'Check' to earn cool rewards!")

8965de68a015baece6ca2a0c61e05d90786b6441
<mask token>

<mask token>


def time_converter(time):
    return datetime.strptime(time.upper().replace('.', ''), '%I:%M %p'
        ).strftime('%H:%M')


<mask token>

<mask token>


def time_converter(time):
    return datetime.strptime(time.upper().replace('.', ''), '%I:%M %p'
        ).strftime('%H:%M')


if __name__ == '__main__':
    print('Example:')
    print(time_converter('12:30 p.m.'))
    assert time_converter('12:30 p.m.') == '12:30'
    assert time_converter('9:00 a.m.') == '09:00'
    assert time_converter('11:15 p.m.') == '23:15'
    print("Coding complete? Click 'Check' to earn cool rewards!")

from datetime import datetime


def time_converter(time):
    return datetime.strptime(time.upper().replace('.', ''), '%I:%M %p'
        ).strftime('%H:%M')


if __name__ == '__main__':
    print('Example:')
    print(time_converter('12:30 p.m.'))
    assert time_converter('12:30 p.m.') == '12:30'
    assert time_converter('9:00 a.m.') == '09:00'
    assert time_converter('11:15 p.m.') == '23:15'
    print("Coding complete? Click 'Check' to earn cool rewards!")

from datetime import datetime


def time_converter(time):

    return datetime.strptime(time.upper().replace('.', ''), '%I:%M %p').strftime('%H:%M')


if __name__ == '__main__':
    print("Example:")
    print(time_converter('12:30 p.m.'))

    #These "asserts" using only for self-checking and not necessary for auto-testing
    assert time_converter('12:30 p.m.') == '12:30'
    assert time_converter('9:00 a.m.') == '09:00'
    assert time_converter('11:15 p.m.') == '23:15'
    print("Coding complete? Click 'Check' to earn cool rewards!")
