human
Run Length Encoding | Python3 program to implement run length encoding.
Count occurrences of current character.
Print character and its count.
Driver code"
How can the above be solved in Python?

What is a code to run Length Encoding and the other steps required?
assistant
#Here is code to run Length Encoding and the other steps required.
 def printRLE ( st ) :
	n = len ( st )
	i = 0
	while i < n - 1 :
		count = 1
		while ( i < n - 1 and st [ i ] == st [ i + 1 ] ) :
			count += 1
			i += 1
		i += 1
		print ( st [ i - 1 ] + str ( count ) , end = " " )
if __name__ == " _ _ main _ _ " :
	st = " wwwwaaadexxxxxxywww "
	printRLE ( st )