2 ms·
I mean it's Python, so you can do anything: >>> fstring="Hello, {\"world\"}" >>> eval(f"print(f'{fstring}')") Hello, world
by throwaway894345 6y ago
I mean it's Python, so you can do anything:
>>> fstring="Hello, {\"world\"}"
>>> eval(f"print(f'{fstring}')")
Hello, world
- CJefferson 6y agoThat doesn't work (easily) in a function as eval only has the global context, not access to local variables (although you can do some hackery to make it work)