import datetime
a = int(input("sekund1"))
b = int(input("sekund2"))
time1 = datetime.strptime(a,"%H%M")
time2 = datetime.strptime(b,"%H%M")
diff = time1 -time2
diff.total_seconds()/3600
I am trying to create a "calculator" for given times in python, my knowledge in the language is very limited and this is how far I've managed to come.
Although this is very limited as it will only subtract given seconds, I am trying to subtract 2 given times in the format HH:MM:SS, but this is where I come at a stop.
I get an error
module 'datetime' has no attribute 'strptime'