Untitled
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)