human
Search , insert and delete in a sorted array | function to implement binary search.
low + ( high - low ) / 2.
Driver program to check above functions Let us search 3 in below array"
How can the above be solved in Python?

Give me a code to search , insert and delete in a sorted array and the other steps required?
assistant
#Here is code to search , insert and delete in a sorted array and the other steps required.
 def binarySearch ( arr , low , high , key ) :
	mid = ( low + high ) / 2
	if ( key == arr [ int ( mid ) ] ) :
		return mid
	if ( key > arr [ int ( mid ) ] ) :
		return binarySearch ( arr , ( mid + 1 ) , high , key )
	if ( key < arr [ int ( mid ) ] ) :
		return binarySearch ( arr , low , ( mid - 1 ) , key )
	return 0
arr = [ 5 , 6 , 7 , 8 , 9 , 10 ]
n = len ( arr )
key = 10
print ( " Index : " , int ( binarySearch ( arr , 0 , n - 1 , key ) ) )