human
Search , insert and delete in an unsorted array | Function to implement search operation.
Driver Code.
Using a last element as search element"
How can the above be solved in Python?

What is a code to search , insert and delete in an unsorted array and the other steps required?
assistant
#Here is code to search , insert and delete in an unsorted array and the other steps required.
 def findElement ( arr , n , key ) :
	for i in range ( n ) :
		if ( arr [ i ] == key ) :
			return i
	return - 1
arr = [ 12 , 34 , 10 , 6 , 40 ]
n = len ( arr )
key = 40
index = findElement ( arr , n , key )
if index != - 1 :
	print ( " element ▁ found ▁ at ▁ position : ▁ " + str ( index + 1 ) )
else :
	print ( " element ▁ not ▁ found " )