Get the latest tech news

Python f-string cheat sheets (2022)


Get quick help with Python's f-string syntax

Type f with precision.n displays n digits after the decimal point. Type g with precision.n displays n significant digits in scientific notation. The below modifiers are special syntaxes supported by all object types.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of python

python

Photo of string cheat sheet

string cheat sheet

Related news:

News photo

Show HN: PlutoPrint – Generate PDFs and PNGs from HTML with Python

News photo

PYX: The next step in Python packaging

News photo

Show HN: I built an offline, open‑source desktop Pixel Art Editor in Python