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.
- Time Conversion
- Discussions
Time Conversion
Time Conversion
Sort by
recency
|
362 Discussions
|
Please Login in order to post a comment
for python3:
is_pm = s.endswith('PM') time_part = s[:-2] hours = int(time_part[:2])
i did not use the datetime function as I figured it is a shortcut this is my appraoch:
def timeConversion(s): # Write your code here l = s.split(":")
my approach: