Re:Pattern matching accepted for Python
by staticassertion on Tuesday February 09, 2021 @06:14PM
(#26083802)
Something along the lines of...
code = 'f"{input()} {x}"'
lambda x: eval(code)
(Please don't do this)
Re:Pattern matching accepted for Python
by staticassertion on Tuesday February 09, 2021 @11:36PM
(#26085783)
code = 'f"here it is {eval(input())}"'
(lambda: eval(code))()
k, there we goYes, I'll stick to using str.format :)
Re:Pattern matching accepted for Python
by klyrs on Wednesday February 10, 2021 @01:33AM
(#26086230)
That isn't the purpose for f-strings. You still have % and .format
Surely this would not work: