Question: please write python3 String Challenge Have the function stringchail lenge (str). take the str parameter being passed and return a compressed version of the string
String Challenge Have the function stringchail lenge (str). take the str parameter being passed and return a compressed version of the string using the Run-length encoding algorithm. This algorithm works by taking the occurrence of each repeating character and outputting that number along with a single character of the repeating sequence. For example: "wwwggopp" would return 3w2g102p. The string will not contain any numbers, punctuation, or symbols. Examples Input: "aabbcde" Output: 2a2b1c1d1e Input: " wwbbbw" Output: 3 wbiw Browse Resources Search for any help or documentation you might need for this problem. For example: array indexing. Ruby hash tables, etc
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
