擅长:python、mysql、java
<p>使用chr()和ord()并计算“a”+数字</p>
<pre><code>def phone(x):
"""
>>> phone(22)
'cc'
>>> phone(1403)
'bead'
"""
result = ""
x = str(x)
result = result.join([chr(int(ch) + ord('a')) for ch in x])
return result
print(phone('22'))
print(phone('1403'))
</code></pre>