Question: In python, write a function named expand that takes a string in the compressed format and returns the original string. You may assume that any

In python, write a function named expand that takes a string in the compressed format and returns the original string. You may assume that any number in the compressed string is a single-digit number. For example: >>> expand("") >>> expand("abc") abc' >>> expand("a3b7c2") "aaabbbbbbbcc
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
