0
How to print a string and integer by the same print("") function without concatenating them???
3 ответов
+ 2
Here are a couple of ways:
1. Seperate values by a comma
print(str, int)
2. Use string formating
print("Hi my name is {0}, I am {1}".format(name, age))
edit:
3. You could also just do
print("the answer is" + str(c))
+ 1
thanks
0
I want to print like this
eg.
c=10
#print("the answer is" + c)
such that the output shows like
the answer is 10