作者在 2010-04-13 16:32:09 发布以下内容
txt = '123456789'
d = {'1':'a',
'2':'b',
'3':'c',
'4':'d',
'5':'e',
'6':'f',
'7':'g',
'8':'h',
'9':'i',
}
for k in d:
txt = txt.replace(k,d[k])
print txt
d = {'1':'a',
'2':'b',
'3':'c',
'4':'d',
'5':'e',
'6':'f',
'7':'g',
'8':'h',
'9':'i',
}
for k in d:
txt = txt.replace(k,d[k])
print txt