Update page 'Day 9 homework - Sloetjes'

xuanyi.wang
2023-04-19 04:57:44 +02:00
parent 794f261ed7
commit c19225ca5f
+1 -1
@@ -76,4 +76,4 @@ print(login)
* In the code above, the name of the module is `"os"`, and the fromlist argument is not given, so the top-level package `"os"` is returned, which is equivalent to importing os with a regular import statement. * In the code above, the name of the module is `"os"`, and the fromlist argument is not given, so the top-level package `"os"` is returned, which is equivalent to importing os with a regular import statement.
Therefore, the expression `__import__('os').getlogin()` is equivalent to `os.getlogin()`, but it dynamically imports the `os` module at runtime instead of using a regular import statement. * Therefore, the expression `__import__('os').getlogin()` is equivalent to `os.getlogin()`, but it dynamically imports the `os` module at runtime instead of using a regular import statement.