From f45d9f699a56c916ac7828577d10a06b1dbc327a Mon Sep 17 00:00:00 2001 From: mmcky Date: Fri, 13 Jun 2025 11:54:45 +1000 Subject: [PATCH] FIX: clarify format() and f-strings --- lectures/python_essentials.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/python_essentials.md b/lectures/python_essentials.md index bc8feb10..e3c9dc21 100644 --- a/lectures/python_essentials.md +++ b/lectures/python_essentials.md @@ -468,7 +468,7 @@ for line in data_file: data_file.close() ``` -Here `format()` is a string method [used for inserting variables into strings](https://docs.python.org/3/library/string.html#formatspec). +Here `f'` is an f-string [used for inserting variables into strings](https://docs.python.org/3/library/string.html#formatspec). The reformatting of each line is the result of three different string methods, the details of which can be left till later.