qpython3 printing variable after string

53 Views Asked by At

I'm wanting to print a variable after a string but the variable doesn't show. I'm following a book called learning python the hard way. In it, it asks to declare a variable:

cars = 100

Print ("how many cars are there"), (cars)

And print it after a string.

However, it only prints the string. I've tried doing it in different ways with brackets, parentheses, etc. to no avail. Can someone help me out please?

1

There are 1 best solutions below

0
On
cars = 100

print ("text", (cars) ,"text")

Thanks anyways