我试图将“$”和totalTransactionCost 移至该字段的右侧。
我当前的代码是:print(f"Total Cost Of All Transactions: ${totalTransactionCost:>63,.2f}")
print(f"Total Cost Of All Transactions: ${totalTransactionCost:>63,.2f}")
该代码能够将totalTransactionCost 移至字段的右侧,但如何也包含“$”?
python f-string
f-string ×1
python ×1