I have two time ranges in python and I would like to find whether there is any overlap between them or not. I am looking for an algorithm for that. For instance I have the following time ranges:
r1 = start=(15:30:43), end=(16:30:56)
r2 = start=(15:40:35), end=(15:50:20)
How can I find the overlap among them in python?