How "import" and "from" work?
- import
- Find the file to load.
- Compile to bytecode if necessary and save the bytecode if possible.
- Run the code of the file loaded.
- Copy names from the imported module to the importing namespace.
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help