Skip to content

Instantly share code, notes, and snippets.

@Nipun2016
Created February 24, 2018 11:37
Show Gist options
  • Save Nipun2016/e12ac66495723af6210c322802589a18 to your computer and use it in GitHub Desktop.
Save Nipun2016/e12ac66495723af6210c322802589a18 to your computer and use it in GitHub Desktop.
new_schedule = {ts1, ts2, ..., ts24} # time-slots from new schedule
booked_schedule = {ts10, ts11, ..., ts18} # time-slots from booking schecdule
# Following line gives us all the timeslots which are in booking_schedule but not in new_schedule
conflicting_timeslots = booking_schedule - new_schedule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment