Untitled

mail@pastecode.io avatar
unknown
python
a year ago
289 B
6
Indexable
test = "100x44y2a"
string_to_build = ""
int_mult = ""
for i in range(len(test)):
    if test[i].isdigit():
        int_mult = int_mult + test[i]
    else:
        string_to_build = string_to_build + (int(int_mult) * str(test[i]))
        int_mult = ""

print(string_to_build)