Given a string of upper case alphabets and we have to compress the string using Run length Encoding.
Input =  "AABBBACCDA"
output = 2A3B1A2C1D1A
Since it's your homework I'm not going to solve it for you. The pythonic way would be to use some "magic" function that will solve your problem.
However you're here to learn programming in general, so implement this:
Count the characters until the next character is different from the current one.
Append to your output string the number the current character showed up and the current character.
Print.
Run length Encoding for a given String