>>> income = 50
>>> print("Your income tax is $",income,".")
Your income tax is $ 50 .
So how do I print "$ 50 ." together?
You can use the sep
argument to print:
>>> income = 50000
>>> print("Your income tax is $", income, ".", sep='')
Your income tax is $50000.
Or use the str.format
:
>>> print("Your income tax is ${}.".format(income))
Your income tax is $50000.
You can also do something like this:
x = 50
x = str(x)
y = 'Your Income is $'
z='.'
print(y+x+z)
Output: Your Income is $50.