In brief
In Python 3.12, tomllib parses TOML 1.0.0 into a dictionary. load() accepts a binary file, while loads() works with a string.
Useful to know
In Python 3.12, tomllib parses TOML 1.0.0 into a dictionary. load() accepts a binary file, while loads() works with a string. [1]
The module does not write TOML. Editing while preserving comments and layout needs more than decoding alone. Distinguish extracting settings from reconstructing the original document after a change.
Sources
For further detail and to check the information: