human
Kth odd number in an array | Function to return the kth odd element from the array.
Traverse the array.
If current element is odd.
If kth odd element is found.
Total odd elements in the array are < k.
Driver code"
How can the above be solved in Python?

=====
Can you provide a code to kth odd number in an array and the other steps required?
assistant
#Here is code to kth odd number in an array and the other steps required.
 def kthOdd ( arr , n , k ) :
	for i in range ( n ) :
		if ( arr [ i ] % 2 == 1 ) :
			k -= 1 ;
		if ( k == 0 ) :
			return arr [ i ] ;
	return - 1 ;
arr = [ 1 , 2 , 3 , 4 , 5 ] ;
n = len ( arr ) ;
k = 2 ;
print ( kthOdd ( arr , n , k ) ) ;