2020年3月2日

Python学习之路(十七):基础知识之模块练习

摘要: 1.写一个函数,接受一个参数,如果是文件,就执行这个文件,如果是文件夹,执行里面的py文件 1 import os 2 def func(path): 3 if os.path.isfile(path) and path.endswith('.py'): 4 os.system('python %s 阅读全文

posted @ 2020-03-02 14:54 Py_studying 阅读(268) 评论(0) 推荐(0) 编辑

导航