You are viewing a single comment's thread. Return to all comments →
Python 3
def timeConversion(s): if s[-2:] == "PM": if s[:2] == "12": return s[:-2] else: return str(int(s[:2])+12) + s[2:-2] else: #AM if s[:2] == "12": return "00" + s[2:-2] else: return s[:-2]
Seems like cookies are disabled on this browser, please enable them to open this website
Time Conversion
You are viewing a single comment's thread. Return to all comments →
Python 3