Python 数字形式转换

template = "零一二三四五六七八九"

s = input()
for c in s:
    print(template[eval(c)], end="")

例子运行结果如下:

Python 数字形式转换_第1张图片

你可能感兴趣的:(Python,练习,Python)