August 12th, 2004, 02:24 PM
1) parse the strings into values that can be compared, either ints as netytan suggested, or datetime objects.
2) put them into a list of tuples of (startTime, endTime), e.g.
[(start1, end1), (start2, end2),...]
3) sort the list, so that the entries are in order of their start time
4) step through the list and compare the end time of each entry with the start time of the next - if it is greater then they overlap
for (index, (start, end)) in enumerate(timeList[:-1]):
if end > timeList[index+1]:
print 'overlapping:', start, end
Dave - The Developers' Coach