How to display {} as part of python f string

Viewed 228

Is there any way I can display {} as part of the f string as it has special meaning in f string. In other words:

If run print(f"hello world {}") , I want a results like hello world {}

My attempted solution is: print(f"hello world \{\}"). But it did not work.

A help will be much appreciated

1 Answers

This should work

print(f"hello world {{}}")
Related