Python 将数字格式化为货币格式字符串 格式化货币 amount = 123456 currency = '¥{:,.0f}'.format(amount) print(currency) 输出: ¥123,456 参考: https://www.kite.com/python/answers/how-to-format-currency-in-python