>>> print(f"--- {lambda s: s[::-1]} ---") File "<stdin>", line 1 (lambda s) ^ SyntaxError: f-string: invalid syntax >>> print(f"--- {(lambda s: s[::-1])} ---") --- <function <lambda> at 0x7f97b775fa60> --- >>> print(f"--- {(lambda s: s[::-1])('I am a string')} ---") --- gnirts a ma I ---
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter