python自帶的shell是什麼-python shell是什麼東西

python shell是Python的命令行。 shell中最常用的是ls命令,python對應的寫法是:os.listdir(dirname),這個函數返回字符串列表,裏面是所有的文件名,不過不包含」.」和」..」。 如果要遍歷整個目錄的話就會比較複雜一點,在解釋器裏試一下: >>> os.listdir(」/」) [’tmp’, "misc’, "opt’, "root’, ".autore
相關文章
相關標籤/搜索