Python 数字形式转换

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

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

例子运行结果如下:

发布了47 篇原创文章 · 获赞 7 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/floraruo/article/details/95216861