题解 | #表示数字#
表示数字
https://www.nowcoder.com/practice/637062df51674de8ba464e792d1a0ac6
# first we mark all the * to space in case we do the later replace action affect the original *
ipt = input().replace("*", " ")
res = ""
for i in ipt:
if i.isdigit():
res += "*" + i + "*"
else:
res += i
# strip all the continuious digits
res = res.replace("**","")
# replace back the * from space
res = res.replace(" ", "*")
print(res)