Discover how to write data to files in Python. Learn the difference between write (w) and append (a) modes, and how to create new files from scripts.