表示数字(Python)
表示数字
http://www.nowcoder.com/questionTerminal/637062df51674de8ba464e792d1a0ac6
我这前后加个字符,就很妙 :)
while True:
try:
res, n, s = '', '0123456789', ' ' + input() + ' '
for i in range(len(s) - 1):
res += s[i]
if s[i] not in n and s[i + 1] in n or s[i] in n and s[i + 1] not in n:
res += '*'
print(res[1:])
except:
break
深信服公司福利 749人发布