Question: Python program that interacts with the file system. Using the OS library to validate that a directory exists before creating a file in that directory.
Python program that interacts with the file system. Using the OS library to validate that a directory exists before creating a file in that directory. The program should prompt the user for the directory they would like to save the file in as well as the name of the file. The program should prompt the user for their name, address, and phone number. The program should write data to a comma separated line in a file and store the file in the directory specified by the user.Next, the program should read the file written to the file system and display the file contents to the user for validation purposes.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
