Level 90 Level 92
Level 91

OS File & Directory Methods


7 words 0 ignored

Ready to learn       Ready to review

Ignore words

Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.

All None

Ignore?
import os
This module provides methods to perfome file-processing operations, such as renaming and deleting files
os.rename(old, new)
Rename existing files
os.remove(file_name)
Remove files
os.mkdir("new subdirectory")
create directories in the current directory.
os.chdir(directory_name)
change the current directory
os.getcwd()
Return a string representing the current working directory
os.rmdir(directory_name)
deletes the directory