随笔分类 -  python

摘要:PEP 8: no newline at end of file 解决方法:代码末尾需要另起一行,光标移到最后回车即可 PEP 8: indentation is not a multiple of four 解决方法:缩进不是4的倍数,检查缩进 PEP 8: over-indented 解决方法: 阅读全文
posted @ 2021-09-29 17:34 KFP天命 阅读(382) 评论(0) 推荐(0)
摘要:##1. file ####__file__是模块文件(即 .py 文件)的一个属性,返回当前模块文件所在的路径,例如当前的项目结构如下: a = os.path.abspath(__file__) print('当前文件绝对路径',a) ####打印 file 返回的结果,可以看到其返回的结果是当 阅读全文
posted @ 2021-09-29 15:54 KFP天命 阅读(63) 评论(0) 推荐(1)