我正在尝试使用区域设置库和列表推导将列表中的值格式化为货币 .

p = [locale.currency([1,2,3,4], grouping=True) for item in [1,2,3,4]]
print(p)

我收到以下错误:

s = format('%%.%if' % digits, abs(val), grouping, monetary=True)
TypeError: bad operand type for abs(): 'list'

如何让 p 的输出为$ 1.00,$ 2.00,$ 3.00,$ 4.00?