Python Programming

  1. Modules and Packages
    1. Module System
      1. Module Concept
        1. Code Organization
          1. Namespace Management
            1. Code Reusability
            2. Importing Modules
              1. import Statement
                1. from import Statement
                  1. import with Aliases
                    1. Selective Imports
                    2. Module Search Path
                      1. sys.path
                        1. PYTHONPATH Environment Variable
                          1. Module Location Resolution
                          2. Module Execution
                            1. name Variable
                              1. Script vs Module Execution
                                1. if name == "main"
                              2. Standard Library
                                1. Mathematical Modules
                                  1. math Module
                                    1. Mathematical Functions
                                      1. Constants
                                      2. random Module
                                        1. Random Number Generation
                                          1. Random Choices
                                            1. Probability Distributions
                                          2. Date and Time
                                            1. datetime Module
                                              1. Date Objects
                                                1. Time Objects
                                                  1. DateTime Objects
                                                    1. Time Formatting
                                                  2. System Interaction
                                                    1. os Module
                                                      1. Operating System Interface
                                                        1. File System Operations
                                                          1. Environment Variables
                                                          2. sys Module
                                                            1. System Parameters
                                                              1. Python Runtime
                                                            2. Data Formats
                                                              1. json Module
                                                                1. JSON Serialization
                                                                  1. JSON Deserialization
                                                                    1. JSON File Handling
                                                                  2. Collections
                                                                    1. collections Module
                                                                      1. namedtuple
                                                                        1. deque
                                                                          1. Counter
                                                                            1. defaultdict
                                                                              1. OrderedDict
                                                                            2. Documentation and Help
                                                                              1. help() Function
                                                                                1. dir() Function
                                                                                  1. Online Documentation
                                                                                2. Package Management
                                                                                  1. Package Concept
                                                                                    1. Package Structure
                                                                                      1. init.py Files
                                                                                        1. Subpackages
                                                                                        2. Python Package Index (PyPI)
                                                                                          1. Package Discovery
                                                                                            1. Package Information
                                                                                            2. pip Package Manager
                                                                                              1. Installing Packages
                                                                                                1. Basic Installation
                                                                                                  1. Version Specification
                                                                                                  2. Package Management
                                                                                                    1. Upgrading Packages
                                                                                                      1. Uninstalling Packages
                                                                                                        1. Listing Packages
                                                                                                        2. Requirements Files
                                                                                                          1. requirements.txt
                                                                                                            1. Dependency Management
                                                                                                              1. Environment Reproduction
                                                                                                          2. Virtual Environments
                                                                                                            1. Virtual Environment Concept
                                                                                                              1. Isolation Benefits
                                                                                                                1. Dependency Management
                                                                                                                  1. Project Separation
                                                                                                                  2. venv Module
                                                                                                                    1. Creating Virtual Environments
                                                                                                                      1. Activating Environments
                                                                                                                        1. Deactivating Environments
                                                                                                                        2. Environment Management
                                                                                                                          1. Package Installation in Environments
                                                                                                                            1. Environment-Specific Dependencies
                                                                                                                              1. Environment Cleanup