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.