Python, how to list files and folders in a directory - Flavio Copes

文章推薦指數: 80 %
投票人數:10人

To list files in a directory, you can use the listdir() method that is provided by the os built-in module: import os dirname = '/users/Flavio/dev' files ... Tolistfilesinadirectory,youcanusethelistdir()methodthatisprovidedbytheosbuilt-inmodule: importos dirname



請為這篇文章評分?