start = datetime.datetime.strptime(start, '%H:%M:%S')
start = datetime.time(start.hour, start.minute, start.second)
tocompare = datetime.datetime.strptime(tocompare, '%H:%M:%S')
tocompare = datetime.time(tocompare.hour, tocompare.minute, tocompare.second)
Compare only time part in datetime - Python