Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Something along the lines of...

    code = 'f"{input()} {x}"'

    lambda x: eval(code)
(Please don't do this)


    code = 'f"here it is {eval(input())}"'
    (lambda: eval(code))()
k, there we go


Yes, I'll stick to using str.format :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: