filmov
tv
Lesson - 39 : Python3 - Python File Handling : Renaming and Deleting Files

Показать описание
**************************************************
**************************************************
Python File Handling : Renaming and Deleting Files:
Python os module provides methods that help you perform file-processing operations, such as renaming and deleting files.
To use this module you need to import it first and then you can call any related functions.
The rename() Method
The rename() method takes two arguments, the current filename and the new filename.
The remove() Method
You can use the remove() method to delete files by supplying the name of the file to be deleted as the argument.
**************************************************
Python File Handling : Renaming and Deleting Files:
Python os module provides methods that help you perform file-processing operations, such as renaming and deleting files.
To use this module you need to import it first and then you can call any related functions.
The rename() Method
The rename() method takes two arguments, the current filename and the new filename.
The remove() Method
You can use the remove() method to delete files by supplying the name of the file to be deleted as the argument.