Directory « File « Python Tutorial






12.4.Directory
12.4.1.verify that '/tmp' is a valid directory and change to that temporary directory, call the getcwd() method
12.4.2.create a subdirectory in our temporary directory
12.4.3.create a test file with two lines and verify that the file has been created by listing the directory again afterward