Python basis - File operations

Python, file, folder (operating function) operating module and the need to involve os shutil module.

The method of introduction is:

import os

First, get current directory

s = os.getcwd()

# S stored in the current directory (ie, folder)

Such as running abc.py, then enter this command will return abc file the folder location.

Guess you like

Origin blog.csdn.net/knight_zhou/article/details/103993170