Suppose I have this example
word1 = "filled"
word2 = "verbs"
word3 = "nouns"
test_string1 = f"I {word1} in these {word2} and {word3}."
If you print this, you get
I filled in these verbs and nouns.
Now, suppose Instead I first do this
test_string2 = "I {word1} in these {word2} and {word3}."
Is there a way to fill in this second string with the corresponding variables?
I tried
test_string3 = f test_string2
But that didn't work.
File "<ipython-input-25-d1b8ffc3fdb5>", line 1
test_string3 = f test_string2
^
SyntaxError: invalid syntax