You are viewing a single comment's thread. Return to all comments →
Using datetime tools:
import os import datetime def timeConversion(s): time_format = "%H:%M:%S" dt_s = datetime.datetime.strptime(s, "%I:%M:%S%p") return datetime.datetime.strftime(dt_s, time_format) if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') s = input() result = timeConversion(s) fptr.write(result + '\n') fptr.close()
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 →
Using datetime tools: