Skip to content

Commit

Permalink
Merge pull request #1667 from iantmn/master
Browse files Browse the repository at this point in the history
Added word bytes in lesson
  • Loading branch information
codediodeio authored Oct 2, 2023
2 parents 90d77dd + ef86e03 commit 4191711
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/lessons/code-this-not-that-python-edition/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ✅
Expand Down Expand Up @@ -264,4 +264,4 @@ f.close()
# Pythonic way 🐍 - Use a context manager ✅
with open("file.txt", "w") as f:
f.write("Hi mom!")
```
```

0 comments on commit 4191711

Please sign in to comment.