test页首

随笔分类 -  python

摘要:import os from PIL import Image # 2022-10-03 class imgcut(): def getpaths(self): '''输入目录,返回图片的绝对路径列表''' while True: dir=input('请输入目录路径: ') paths=[] fo 阅读全文
posted @ 2022-10-03 11:08 开饭了没 阅读(43) 评论(0) 推荐(0) 编辑
摘要:import pyperclip pyperclip.copy(text) 把text字符串中的字符复制到剪切板 text = pyperclip.paste() 把剪切板上的字符串复制到text 阅读全文
posted @ 2022-09-29 15:24 开饭了没 阅读(11) 评论(0) 推荐(0) 编辑
摘要:# 1 print('11122223344444'.lstrip('123')) #44444 ,匹配时不是按照整个字符串匹配的,而是一个个匹配的。 # 2 'xxxx'.replace('xx','x*x') #x*xx*x #解决方法 while cmd!=cmd.replace('xx',' 阅读全文
posted @ 2022-09-21 22:16 开饭了没 阅读(15) 评论(0) 推荐(0) 编辑
摘要:reduce 对可迭代对象进行累积操作 https://www.runoob.com/python/python-func-reduce.html 注意:Python3.x reduce() 已经被移到 functools 模块里,如果我们要使用,需要引入 functools 模块来调用 reduc 阅读全文
posted @ 2022-09-21 19:55 开饭了没 阅读(19) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/weixin_44725500/article/details/103571403 阅读全文
posted @ 2022-06-17 10:40 开饭了没 阅读(14) 评论(0) 推荐(0) 编辑
摘要:汉字编码;python输出所有汉字;pypinyin拼音搜索汉字; 阅读全文
posted @ 2022-04-16 05:48 开饭了没 阅读(431) 评论(0) 推荐(0) 编辑
摘要:str # C标准中空白字符有:空格(' ')、换页('\f')、换行('\n')、回车('\r')、水平制表符('\t')、垂直制表符('\v') str.strip() # 去除两边空白符(whitespaces); str.lstrip()去除左空白; str.rstrip()去除右空白 st 阅读全文
posted @ 2022-04-15 20:21 开饭了没 阅读(30) 评论(0) 推荐(0) 编辑
摘要:基础 https://docs.python.org/zh-cn/3/library/datetime.html 源代码: Lib/datetime.py 类继承关系: object timedelta tzinfo timezone time date datetime datetime.date 阅读全文
posted @ 2022-04-15 19:47 开饭了没 阅读(33) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/tkqasn/p/6001134.html 阅读全文
posted @ 2022-04-15 19:13 开饭了没 阅读(17) 评论(0) 推荐(0) 编辑

test页脚

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