I want to accomplish the following
answer = True
myvar = \"the answer is \" + answer
and have myvar\'s value be \"the answer is True\". I\'m pr
Using the so called f strings:
answer = True
myvar = f"the answer is {answer}"
Then if I do
print(myvar)
I will get:
the answer is True
I like f strings because one does not have to worry about the order in which the variables will appear in the printed text, which helps in case one has multiple variables to be printed as strings.