times = [(10, 12), (11, 13), (12, 15), (14, 16), (15, 17)]
times.sort(key=lambda x: x[1])
count = 0
end_time = 0
for start, end in times:
if start >= end_time:
count += 1
end_time = end
print(count)
To embed this project on your website, copy the following code and paste it into your website's HTML: