0
如何改变,
的默认值在下面的代码,以便它不插入空格如何更改Python中逗号的值?
gas = int(input("How much have you spent on gas? "))
electric = int(input("How much have you spent on electric? "))
onlinePurchases = int(input("How much have you spent on online purchases? "))
total = gas + electric + onlinePurchases
print("Monthly Total: $", total)
当前的代码将打印:
"Monthly total: $ *total*"
有没有一种方法,使它打印:
"Monthly total: $*total*"
我不希望美元符号和金额之间的空间。
谢谢你,只是让我知道是“月”短期的“分离”,如果没有这是什么立场? – user3131132
这是正确的 – mhlester