How to list only top level directories in Python? - Stack Overflow

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

For Python <=2.5 use: os.walk('. ... Thus the [1] index returns only the dirnames from that tuple. ... import glob, os glob.glob('*' + os.path.sep). JoinStackOverflowtolearn,shareknowledge,andbuildyourcareer. Signupwithemail Signu



請為這篇文章評分?