From 65cf2c8d119e86ac5f50b922fd3c4a52795008b9 Mon Sep 17 00:00:00 2001 From: Edvard Pedersen Date: Mon, 14 Sep 2020 15:19:41 +0200 Subject: [PATCH] fix bracket error in accessing dictionary --- book_src/chapters/dictstring.do.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book_src/chapters/dictstring.do.txt b/book_src/chapters/dictstring.do.txt index 70ac47d..88b6519 100644 --- a/book_src/chapters/dictstring.do.txt +++ b/book_src/chapters/dictstring.do.txt @@ -103,7 +103,7 @@ A concrete example based on the example above could look like !bc pycod-t temps = {'Oslo': 13, 'London': 15.4, 'Paris': 17.5, 'Madrid': 26} for city in temps: - print(f'The {city} temperature is temps{city}') + print(f'The {city} temperature is temps[city]') !ec # #if FORMAT != 'ipynb' with the following output: