how to print text after an interger 1

how to print text after an interger

print("The text you want" + str(var) + "to print")

Here is what the above code is Doing:
1. It’s creating a variable called var and assigning it the value of the string “Hello, world!”
2. It’s printing the string “The text you want” and concatenating it with the value of var.
3. It’s printing the string “to print” and concatenating it with the value of var.

The output of the code would be:
The text you wantHello, world!to print

Similar Posts