Skip to content

Glossary: Coding with AI Assistants

f-string

Also written: f-strings, format codes

A Python string starting with `f` that fills in values inside `{}`. Codes after a colon control layout, such as `{x:<20}` to left-align in 20 characters or `{x:>7.2f}` for a right-aligned number with 2 decimals.

Where the book teaches it

Related terms

Decimal