human
Longest dividing subsequence | lds ( ) returns the length of the longest dividing subsequence in arr [ ] of size n.
Compute optimized lds values in bottom up manner.
Return maximum value in lds [ ].
Driver Code"
How can the above be solved in Python?

Write me a code to longest dividing subsequence and the other steps required?
assistant
#Here is code to longest dividing subsequence and the other steps required.
 def lds ( arr , n ) :
	lds = [ 0 for i in range ( n ) ]
	lds [ 0 ] = 1
	for i in range ( n ) :
		lds [ i ] = 1
		for j in range ( i ) :
			if ( lds [ j ] != 0 and arr [ i ] % arr [ j ] == 0 ) :
				lds [ i ] = max ( lds [ i ] , lds [ j ] + 1 )
	return max ( lds )
arr = [ 2 , 11 , 16 , 12 , 36 , 60 , 71 , 17 , 29 , 144 , 288 , 129 , 432 , 993 ]
print ( " Length ▁ of ▁ lds ▁ is " , lds ( arr , len ( arr ) ) )