Time Conversion

  • + 0 comments
    from datetime import datetime
    #
    # Complete the 'timeConversion' function below.
    #
    # The function is expected to return a STRING.
    # The function accepts STRING s as parameter.
    #
    
    def timeConversion(s):
        # Write your code here
        time_obj = datetime.strptime(s,'%I:%M:%S%p')
        return time_obj.strftime('%H:%M:%S')