I'm trying to pull a string from JSON, then convert it to an f string to be used dynamically. Example Assigned from JSON I get
whose_fault= "{name} started this whole mess"
How to build a lambda to convert it to an f-string and insert the given variable? I just can't quite get my head around it. I know similar questions have been asked, but no answer seems to quite work for this.
Better question. What's the most pythonic way to insert a variable into a string (which cannot be initially created as an f-string)? My goal would be a lambda function if possible. The point being to insert the same variable into whatever string is given where indicated said string.