Learn multiple methods to list files in Python directories and store them in lists. Compare os.listdir(), pathlib, os.scandir(), and os.walk() with practical examples and best practices.
Learn how to determine both the current working directory and script directory in Python using os.getcwd() and os.path.dirname(). Complete guide with pathlib alternatives and practical examples.
Learn how to access environment variables in Python using os.environ and getenv(). Complete guide with examples, best practices, and safety considerations for secure application configuration.