You are viewing a single comment's thread. Return to all comments →
Could you explain this? I tried this code in my python 2.7, but it told me that there's no modules with this name.
Here's my solution
time = raw_input() night = 0 if 'PM' in time: night = 12 time = time[:8].split(':') if time[0] == '12': time[0] = 0 time[0] = str(int(time[0]) + night) newtime = str() for x in time: newtime += x + ':' if len(newtime) < 9: newtime = '0' + newtime print newtime[:8]
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 →
Could you explain this? I tried this code in my python 2.7, but it told me that there's no modules with this name.
Here's my solution