ahmadabdelhalim · @ahmadabdelhalim

Github

compress_str

ahmadabdelhalim · @ahmadabdelhalim · about 4 years

a function that accepts a string as an argument, and returns a new string where streaks of consecutive characters are compressed. For example “aaabbc” is compressed to “3a2bc”.

2 · 1 · 0 Show code