- 博客(5)
- 收藏
- 关注
原创 读写文件,Json文件
(151条消息) python读取和保存json文件_python 读取json_木盏的博客-CSDN博客(151条消息) python 使用 with open() as 读写文件_漠北尘-Gavin的博客-CSDN博客在Python中使用“ with open”打开多个文件 - 知乎 (zhihu.com)
2023-04-11 15:37:24
41
原创 argparse模块
argparse模块用法实例详解 - 知乎 (zhihu.com)(151条消息) python之argparse模块常见用法包含实例(超详细)_python argparse_小白菜儿929的博客-CSDN博客(151条消息) action='store_true'_LemonTree_Summer的博客-CSDN博客
2023-04-11 15:10:58
46
1
原创 os.path.abspath(__file__) / os.path.dirname(__file__) / os.path.basename(__file__)
1. os.path.abspath(__file__): 返回当前脚本的绝对路径 eg: C:\11\22\test.py。3. os.path.basename(__file__): 返回脚本的名称 eg: test.py。返回的是运行时脚本文件的父路径,如:"Python ./test.py" 则返回父路径: "."2. os.path.dirname(__file__): 返回。的父路径 eg: C:\11\22。
2023-04-11 11:32:00
242
1
原创 Python 换行
三引号用于长字符串的断行,除了注释,还有个重要的特性,所见即所得。反斜杠 \ 是常见的代码断行符号。1. 三个单引号/双引号。
2023-03-31 11:31:20
162
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人