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

If you want braces in your f strings you double them up.

Ex:

n = "hn"

print(f"hello {n} your path is {{path}}")

Out: hello hn your path is {path}



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

Search: