human
Analysis of Algorithms | Set 2 ( Worst , Average and Best Cases ) | Linearly search x in arr [ ] . If x is present then return the index , otherwise return - 1.
Driver Code"
How can the above be solved in Python?

Can you provide a code to analysis of Algorithms and the other steps required?
assistant
#Here is code to analysis of Algorithms and the other steps required.
 def search ( arr , x ) :
	for index , value in enumerate ( arr ) :
		if value == x :
			return index
	return - 1
arr = [ 1 , 10 , 30 , 15 ]
x = 30
print ( x , " is ▁ present ▁ at ▁ index " , search ( arr , x ) )