python順序執行多個py文件

假如我要執行code目錄下的python程序,假設該目錄下有1.py,2.py,3.py,4.py四個文件,可是我想執行1.py,2.py,4.py,則可在該目錄下建立一個python文件,代碼以下:python import os os.system("python ./1.py") os.system("python ./2.py") os.system("python ./4.py") 若想
相關文章
相關標籤/搜索