题解 | 表示数字
s=input() start=False res="" for c in s: if c.isdigit(): if not start: start=True res+="*" else: if start: res+="*" start=False res+=c if start: res+="*" print(res)
s=input() start=False res="" for c in s: if c.isdigit(): if not start: start=True res+="*" else: if start: res+="*" start=False res+=c if start: res+="*" print(res)
相关推荐