human
Rank of all elements in a Stream in descending order when they arrive | FindRank function to find rank.
Rank of first element is always 1.
Iterate over array.
As element let say its rank is 1.
Element is compared with previous elements.
If greater than previous than rank is incremented.
print rank.
Driver code.
array named arr.
length of arr"
How can the above be solved in Python?

Give me a code to rank of all elements in a Stream in descending order when they arrive and the other steps required?
assistant
#Here is code to rank of all elements in a Stream in descending order when they arrive and the other steps required.
 def FindRank ( arr , length ) :
	print ( 1 , end = " ▁ " )
	for i in range ( 1 , length ) :
		rank = 1
		for j in range ( 0 , i ) :
			if ( arr [ j ] > arr [ i ] ) :
				rank = rank + 1
		print ( rank , end = " ▁ " )
if __name__ == ' _ _ main _ _ ' :
	arr = [ 88 , 14 , 69 , 30 , 29 , 89 ]
	length = len ( arr )
	FindRank ( arr , length )