Update page 'Day 9 homework - Sloetjes'
@@ -52,8 +52,8 @@ print(get_all_modules_size())
|
|||||||
|
|
||||||
**5. With only the `sys` module loaded, look at the `sys.modules` dict. What is the type of the value of the `os` key?**
|
**5. With only the `sys` module loaded, look at the `sys.modules` dict. What is the type of the value of the `os` key?**
|
||||||
##### Answer:
|
##### Answer:
|
||||||
The type of the value of the `os` key in the sys.modules dictionary depends on whether the os module has been loaded yet.
|
* The type of the value of the `os` key in the sys.modules dictionary depends on whether the os module has been loaded yet.
|
||||||
|
|
||||||
If the `os` module has not been loaded yet, the value of the `os` key will be `NoneType`.
|
* If the `os` module has not been loaded yet, the value of the `os` key will be `NoneType`.
|
||||||
|
|
||||||
If the os module has been loaded, the value of the os key will be a module object representing the `os` module.
|
* If the os module has been loaded, the value of the os key will be a module object representing the `os` module.
|
||||||
|
|||||||
Reference in New Issue
Block a user