def bsearch(comparables, key):
	"""Return index when key is found in an ordered array; otherwise return 
	None (binary search)
	
	Parameters:
	comparables -- an ascending ordered array
	key         -- key to be searched 
	"""
	lo, hi = 0, len(comparables)
	while lo < hi:
		mid = lo + (hi - lo)//2
		if comparables[mid] > key: hi = mid
		elif comparables[mid] < key: lo = mid + 1
		else: return mid
	return None