# Time Conversion

def timeConversion(s):
    """ Converts to military (24-hour) time """
    new_s = ''
    if s[-2:] == 'PM' and s[:2] != '12':
        new_s = str(int(s[:2]) + 12) + s[2:-2]
    elif s[-2:] == 'AM' and s[:2] == '12':
        new_s = '0' + str(int(s[:2]) - 12) + s[2:-2]
    else:
        new_s = s[:-2]
    return new_s


# Running some tests..
print(timeConversion('07:05:45PM') == '19:05:45')
70c263591f0e76ce956d97a6d167a3ba364ae223
<mask token>

def timeConversion(s):
    """ Converts to military (24-hour) time """
    new_s = ''
    if s[-2:] == 'PM' and s[:2] != '12':
        new_s = str(int(s[:2]) + 12) + s[2:-2]
    elif s[-2:] == 'AM' and s[:2] == '12':
        new_s = '0' + str(int(s[:2]) - 12) + s[2:-2]
    else:
        new_s = s[:-2]
    return new_s


<mask token>

def timeConversion(s):
    """ Converts to military (24-hour) time """
    new_s = ''
    if s[-2:] == 'PM' and s[:2] != '12':
        new_s = str(int(s[:2]) + 12) + s[2:-2]
    elif s[-2:] == 'AM' and s[:2] == '12':
        new_s = '0' + str(int(s[:2]) - 12) + s[2:-2]
    else:
        new_s = s[:-2]
    return new_s


print(timeConversion('07:05:45PM') == '19:05:45')

# Time Conversion

def timeConversion(s):
    """ Converts to military (24-hour) time """
    new_s = ''
    if s[-2:] == 'PM' and s[:2] != '12':
        new_s = str(int(s[:2]) + 12) + s[2:-2]
    elif s[-2:] == 'AM' and s[:2] == '12':
        new_s = '0' + str(int(s[:2]) - 12) + s[2:-2]
    else:
        new_s = s[:-2]
    return new_s


# Running some tests..
print(timeConversion('07:05:45PM') == '19:05:45')