You are viewing a single comment's thread. Return to all comments →
Give me your opinions guys:
def timeConversion(s): time_part = s.split(":") if "PM" in time_part[2]: time_part = s.split("PM") time_part_liste = time_part[0].split(":") if time_part_liste[0] == "12": s = (":").join(time_part_liste) else: time_part_liste[0] = str(int(time_part_liste[0]) + 12) s = (":").join(time_part_liste) elif "AM" in time_part[2]: time_part = s.split("AM") time_part_liste = time_part[0].split(":") if time_part_liste[0] == "12": time_part_liste[0] = "00" s = (":").join(time_part_liste) else: s = (":").join(time_part_liste) return s
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 →
Give me your opinions guys: