0
Please help me het the error in my python code... I am trying to convert time from 12hour fromat to 24hour. Inputs r with AM/PM
time = input() time.split(':ampm ') hour = int(time[0]) minute = int(time[1]) if hour < 12: hour += 12 print (f"{hour}:{minute}")
2 Respuestas
+ 1
Is your input like 2am or 2:ampm
0
The input is like:
1:30 am
Output:
13:30