Web Analytics

Python os.listdir() Method

OS & Systemโ€ขDirectory

The os.listdir() method returns a list of files and directories.

Syntax

os.listdir(path='.')

Return Value

A list of filenames.

Example

Output
Click Run to execute your code