0

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?

Lauraducky
  • 674
  • 11
  • 25
1byanymeans
  • 105
  • 1
  • 3

1 Answers1

0
cars = 100

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

Thanks anyways

Lauraducky
  • 674
  • 11
  • 25
1byanymeans
  • 105
  • 1
  • 3