From b704965bd1054b1fb6e7569adcba3911f0eb8a41 Mon Sep 17 00:00:00 2001 From: "xuanyi.wang" Date: Wed, 19 Apr 2023 02:20:33 +0200 Subject: [PATCH] Update page 'Day 9 homework - Sloetjes' --- Day 9 homework - Sloetjes.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Day 9 homework - Sloetjes.md b/Day 9 homework - Sloetjes.md index 6d714eb..1a1d93a 100644 --- a/Day 9 homework - Sloetjes.md +++ b/Day 9 homework - Sloetjes.md @@ -18,14 +18,7 @@ def get_module_size(module_name): 2. Create another function that uses the last function to see how many bytes are in all the modules listed in sys.modules. ``` -import sys - -def get_total_module_size(): - """Returns the total size of all loaded modules.""" - total_size = 0 - for module_name in sys.modules: - total_size += get_module_size(module_name) - return total_size + ``` 3. Run your Python interpreter like you would normally, using Jupyter, and run the last function. How many bytes are being used?