Python Part - 6 !


os module :
Python os module can be used to perform tasks such as finding the name of present working directory, changing current working directory, checking if certain files or directories exist at a location, creating new directories, deleting existing files or directories, walking through a directory and performing operations on every file in the directory that satisfies some user-defined criteria, and a lot more.
There are many functions of os module which are as follows :
1) Finding Information about the current working directory
2) Change to another directory
3) Creating Directories
4) Extracting filename from a given path


Now we will learn to use os module and how to copy data from one file to another.
make 3 files. One file for the script, one from data is to be copied and one to which data is to be copied.

No comments:

Post a Comment

SAY HELLO!!