time = raw_input()
if "PM" in time:
ls = time.split(":")
int(ls[0])
print type(ls[0])
I have a problem on Hackerearth which I was solving. But my code here doesn't change the str to int. The output is
<type 'str'>
I want to change the first element of the time to int so i can perform mathematical calculations on it. Input it takes is
6:05:08PM