# The Problem

Dan, president of a Large company could use your help. He wants to implement a system that will switch all his devices into offline mode depending on his meeting schedule. When he's at a meeting and somebody texts him, he wants to send an automatic message informing that he's currently unavailable and the time when he's going to be back.

# What To Do

Your task is to write a helper function `checkAvailability` that will take 2 arguments:

* schedule, which is going to be a nested array with Dan's schedule for a given day. Inside arrays will consist of 2 elements - start and finish time of a given appointment,

* *currentTime* - is a string with specific time in hh:mm 24-h format for which the function will check availability based on the schedule.
  * If no appointments are scheduled for `currentTime`, the function should return `true`. If there are no appointments for the day, the output should also be `true`
  *  If Dan is in the middle of an appointment at `currentTime`, the function should return a string with the time he's going to be available.
  
  
# Examples
`checkAvailability([["09:30", "10:15"], ["12:20", "15:50"]], "11:00");`
should return `true`

`checkAvailability([["09:30", "10:15"], ["12:20", "15:50"]], "10:00");`
should return `"10:15"`

If the time passed as input is *equal to the end time of a meeting*, function should also return `true`.
`checkAvailability([["09:30", "10:15"], ["12:20", "15:50"]], "15:50");`
should return `true`

*You can expect valid input for this kata*

Source: codewars | Difficulty: EASY

Starter code: def check_availability(schedule, current_time):
	

Solutions:
def check_availability(schedule, current_time):
	for (tb, te) in schedule:
		if tb <= current_time < te:
			return te
	return True


def check_availability(schedule, current_time):
	for time in schedule:
		if time[0] <= current_time < time[1]:
			return time[1]
	return True


def check_availability(schedule, current_time):
	return next((end for (start, end) in schedule if start < current_time < end), True)


check_availability = lambda sh, ct: next((j for (i, j) in sh if ct > i and ct < j), 1)


def check_availability(schedule, now):
	return next((end for (start, end) in schedule if start <= now < end), True)


def check_availability(schedule, current_time):
	return next((stop for (start, stop) in schedule if start <= current_time < stop), True)


def check_availability(schedule, current_time):
	for (s, e) in schedule:
		if s <= current_time < e:
			return e
	return True


def check_availability(schedule, current_time):
	for meeting in schedule:
		return meeting[1] if meeting[0] <= current_time < meeting[1] else True
	return True


def check_availability(sched, now):
	b = [t1 < now < t2 for (t1, t2) in sched]
	return sched[b.index(True)][1] if True in b else True