We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
deftimeConversion(s):# Write your code herehours,minutes,seconds,format=re.findall(r'\d+|\w+',s)ifformat=="PM"andhours!="12":hours=str(int(hours)+12)elifformat=="AM"andhours=="12":hours="00"else:passreturn(f"{hours}:{minutes}:{seconds}")
`
Cookie support is required to access HackerRank
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
`