Am 23.01.23 um 17:43 schrieb Stefan Ram:
Johannes Bauer <dfnsonfsdu...@gmx.de> writes:
x = { "y": "z" }
s = "-> {x['y']}"
print(s.format(x = x))

x = { "y": "z" }
def s( x ): return '-> ' + x[ 'y' ]
print( s( x = x ))

Except this is not at all what I asked for. The string "s" in my example is just that, an example. I want to render *arbitrary* strings "s" together with arbitrary dictionaries "x".

Cheers,
Johannes

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to