If you get an error, it would help to share what that error is.
What kind of data is in variable? If it’s not a string, then + will give an error. You’ll need to convert it to a string: "Text" + str(variable) + "Text".
For more complete string formatting, such as decimal places, etc. see: