human
Printing frequency of each character just after its consecutive occurrences | Python 3 program to print run length encoding of a string.
Counting occurrences of s [ i ].
Driver Code"
Solution in Python:
assistant
#Here is code to printing frequency of each character just after its consecutive occurrences and the other steps required.
 def printRLE ( s ) :
	i = 0
	while ( i < len ( s ) - 1 ) :
		count = 1
		while s [ i ] == s [ i + 1 ] :
			i += 1
			count += 1
			if i + 1 == len ( s ) :
				break
		print ( str ( s [ i ] ) + str ( count ) , end = " ▁ " )
		i += 1
	print ( )
if __name__ == " _ _ main _ _ " :
	printRLE ( " GeeeEEKKKss " )
	printRLE ( " cccc0ddEEE " )