Time Conversion

  • + 0 comments

    if s[:2] == '12' and s[8:] == 'AM': return '00'+ s[2:8] elif s[:2] == '12' and s[8:] == 'PM': return '12' + s[2:8] elif s[8:]== "AM": return s[0:8] else: return str(int(s[:2])+12)+ s[2:8]