What I want:
I have string, like that: '1:48'
I want to add some minutes to it, for example 15 minutes and to print '2:03'
.
What is the problem:
I am newbie to Python and following official documentation, I cannot do it.
What I tried:
After google research I found a way to create time object from string, like this:
import time
hours = input()
minutes = input()
time_str = hours + ':' + minutes;
test = time.strptime(time_str, '%H:%M')
print(test)
But I cannot find a method from time
library which add time. I found that method in datetime
(timedelta) library, but there is not a method which create time object from string.