随笔分类 -  Python

摘要:Python 笔记 ctrl + c 强制终端程序 alt + p 重复调出上个语句 BIF(Buid-in Functions )是Python的内置函数,为了方便程序员快捷编写脚本程序。 len(dir(builtins)):158 python 3.12.5内置函数有158个 打开window 阅读全文
posted @ 2024-10-28 23:13 lurenj 阅读(10) 评论(0) 推荐(0) 编辑
摘要:# coding: utf-8 import os import shutil import re if __name__ == "__main__": src = r"C:\Users\Windows11\Desktop\test" # 原文件夹路径 des = r"C:\Users\Window 阅读全文
posted @ 2024-09-20 01:03 lurenj 阅读(17) 评论(0) 推荐(0) 编辑
摘要:# coding: utf-8 import os import shutil if __name__ == "__main__": src = r"C:\Users\Windows11\Desktop\test" # 原文件夹路径 des = r"C:\Users\Windows11\Deskto 阅读全文
posted @ 2024-09-19 00:14 lurenj 阅读(41) 评论(0) 推荐(0) 编辑
摘要:python中*args和**kwargs的理解 打包(pack):*args是把多个位置参数打包成元组,** kwargs是把多个关键字参数打包成字典。 拆分(unpack):* args是把打包了的参数拆成单个的,依次赋值给函数的形参,** kwargs是把字典的键值拆成单个的,依次赋值给函数的 阅读全文
posted @ 2024-09-05 22:18 lurenj 阅读(139) 评论(0) 推荐(0) 编辑
摘要:遍历方式更改文件名 import os import sys import re # 定义一个名字叫做rename的函数 def rename(filePath): """ 批量重命名指定路径下的'.dbf', '.prj', '.shp', '.shx'格式的文件,重命名格式:文件_文件夹名字, 阅读全文
posted @ 2024-09-04 20:43 lurenj 阅读(96) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示