字符串转换
import re
try:
while True:
n = raw_input().lower()
l = []
for i in n:
if not i.isdigit():
l.append(i);
str = ''
for i in xrange(len(l)):
if l[i]=='a':
str+='*~*'
else:
str+=l[i]
print re.sub('\*\*', "", str)
except:
pass
转载于:https://blog.51cto.com/gzmie/1851670