如何在Python3中不使用空格打印?
那么如何同时打印“$50.”?使用: 使用: 使用: 使用:如何在Python3中不使用空格打印?,python,Python,那么如何同时打印“$50.”?使用: 使用: 使用: 使用: 您可以使用sep参数打印: print("Your income tax is ${0}.".format(income)) 或者使用str.format: >>> income = 50000 >>> print("Your income tax is $", income, ".", sep='') Your income tax is $50000. 您可以使用sep参数打印: print
您可以使用
sep
参数打印:
print("Your income tax is ${0}.".format(income))
或者使用str.format
:
>>> income = 50000
>>> print("Your income tax is $", income, ".", sep='')
Your income tax is $50000.
您可以使用
sep
参数打印:
print("Your income tax is ${0}.".format(income))
或者使用str.format
:
>>> income = 50000
>>> print("Your income tax is $", income, ".", sep='')
Your income tax is $50000.
您可以使用
sep
参数打印:
print("Your income tax is ${0}.".format(income))
或者使用str.format
:
>>> income = 50000
>>> print("Your income tax is $", income, ".", sep='')
Your income tax is $50000.
您可以使用
sep
参数打印:
print("Your income tax is ${0}.".format(income))
或者使用str.format
:
>>> income = 50000
>>> print("Your income tax is $", income, ".", sep='')
Your income tax is $50000.
您也可以这样做:
>>> print("Your income tax is ${}.".format(income))
Your income tax is $50000.
输出:
你的收入是50美元。你也可以这样做:
>>> print("Your income tax is ${}.".format(income))
Your income tax is $50000.
输出:
你的收入是50美元。你也可以这样做:
>>> print("Your income tax is ${}.".format(income))
Your income tax is $50000.
输出:
你的收入是50美元。你也可以这样做:
>>> print("Your income tax is ${}.".format(income))
Your income tax is $50000.
输出:
您的收入是50美元。将此关键字arg添加到打印函数
sep=''
或使用str.format()
将此关键字arg添加到打印函数sep=''
或使用str.format()
将此关键字arg添加到打印函数sep=''
或使用str format()
将此关键字arg添加到打印函数sep=''
或使用str.format()