human
Search , insert and delete in a sorted array | To search a ley to be deleted.
Function to delete an element.
Find position of element to be deleted.
Deleting element.
Driver code"
Solution 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 ) :
	if ( high < low ) :
		return - 1
	mid = ( low + high ) // 2
	if ( key == arr [ mid ] ) :
		return mid
	if ( key > arr [ mid ] ) :
		return binarySearch ( arr , ( mid + 1 ) , high , key )
	return binarySearch ( arr , low , ( mid - 1 ) , key )
def deleteElement ( arr , n , key ) :
	pos = binarySearch ( arr , 0 , n - 1 , key )
	if ( pos == - 1 ) :
		print ( " Element ▁ not ▁ found " )
		return n
	for i in range ( pos , n - 1 ) :
		arr [ i ] = arr [ i + 1 ]
	return n - 1
arr = [ 10 , 20 , 30 , 40 , 50 ]
n = len ( arr )
key = 30
print ( " Array ▁ before ▁ deletion " )
for i in range ( n ) :
	print ( arr [ i ] , end = " ▁ " )
n = deleteElement ( arr , n , key )
print ( " Array after deletion " )
for i in range ( n ) :
	print ( arr [ i ] , end = " ▁ " )