From ef86e03e99838cd1d11e3eaff3e5a0b701bc21d7 Mon Sep 17 00:00:00 2001 From: Ian <45848779+iantmn@users.noreply.github.com> Date: Sat, 16 Sep 2023 11:05:39 +0200 Subject: [PATCH] Added word bytes in lesson --- content/lessons/code-this-not-that-python-edition/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/lessons/code-this-not-that-python-edition/index.md b/content/lessons/code-this-not-that-python-edition/index.md index 277e95a36..cdfc907f8 100644 --- a/content/lessons/code-this-not-that-python-edition/index.md +++ b/content/lessons/code-this-not-that-python-edition/index.md @@ -215,7 +215,7 @@ from sys import getsizeof # Inefficent way 💩: Using a list ❌ L = [n for n in range(42_000)] -sum(L) # 881979000 +sum(L) # 881979000 bytes getsizeof(L) # 351064 bytes # Efficient way 🔥: Use a generator ✅ @@ -264,4 +264,4 @@ f.close() # Pythonic way 🐍 - Use a context manager ✅ with open("file.txt", "w") as f: f.write("Hi mom!") -``` \ No newline at end of file +```