随笔分类 -  python

python基础及自动化
摘要:1.将文件夹内图片批量旋转 import os from PIL import Image for i in os.listdir(): im=Image.open(i) im_rotate=im.transpose(Image.ROTATE_90) #逆时针旋转90度 im_rotate.save 阅读全文
posted @ 2021-07-05 19:36 yescarf 阅读(69) 评论(0) 推荐(0) 编辑
摘要:fortmat传入列表元组字典 阅读全文
posted @ 2020-12-30 14:20 yescarf 阅读(283) 评论(0) 推荐(0) 编辑
摘要:python + mysql 用户管理权限管理分析;pymysql 阅读全文
posted @ 2020-11-29 17:27 yescarf 阅读(531) 评论(0) 推荐(0) 编辑
摘要:pymsql简单应用 阅读全文
posted @ 2020-11-29 16:44 yescarf 阅读(1541) 评论(0) 推荐(0) 编辑
摘要:#列表推导式的高明之处 lis=[(i**2)/2 for i in range(1,11)] for i in lis: print(i) #找出桌面以xlsx结尾的文件 import os ls=[file for file in os.listdir(r'C:\Users\Desktop') 阅读全文
posted @ 2020-10-19 16:34 yescarf 阅读(135) 评论(0) 推荐(0) 编辑
摘要:字符串拼接 转至:https://blog.csdn.net/yangschfly/article/details/86522953?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1. 阅读全文
posted @ 2020-10-19 15:23 yescarf 阅读(99) 评论(0) 推荐(0) 编辑
摘要:open函数理解 open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None) mode模式 合法mode:r、rb、r+、rb+、w、wb、w+、wb+ 阅读全文
posted @ 2020-10-10 11:34 yescarf 阅读(1106) 评论(0) 推荐(0) 编辑
摘要:while怎么用 阅读全文
posted @ 2020-09-14 19:13 yescarf 阅读(675) 评论(0) 推荐(0) 编辑
摘要:类属性与对象属性 阅读全文
posted @ 2020-05-17 21:50 yescarf 阅读(226) 评论(0) 推荐(0) 编辑
摘要:类-方法的重写 阅读全文
posted @ 2020-05-17 21:43 yescarf 阅读(444) 评论(0) 推荐(0) 编辑
摘要:3.1python多态与多态性 阅读全文
posted @ 2020-05-17 21:41 yescarf 阅读(280) 评论(0) 推荐(0) 编辑
摘要:python多继承 阅读全文
posted @ 2020-05-17 21:39 yescarf 阅读(125) 评论(0) 推荐(0) 编辑
摘要:继承 阅读全文
posted @ 2020-05-17 21:38 yescarf 阅读(116) 评论(0) 推荐(0) 编辑
摘要:python__del__()方法 阅读全文
posted @ 2020-05-17 21:36 yescarf 阅读(208) 评论(0) 推荐(0) 编辑
摘要:python属性和方法私有化 阅读全文
posted @ 2020-05-17 21:35 yescarf 阅读(206) 评论(0) 推荐(0) 编辑
摘要:骰子游戏 阅读全文
posted @ 2020-05-17 21:30 yescarf 阅读(144) 评论(0) 推荐(0) 编辑
摘要:python str方法 阅读全文
posted @ 2020-05-17 21:27 yescarf 阅读(149) 评论(0) 推荐(0) 编辑
摘要:python魔法方法 阅读全文
posted @ 2020-05-17 21:26 yescarf 阅读(143) 评论(0) 推荐(0) 编辑
摘要:操作:关于文本写入中的 r,w,a,b,+的操作 https://blog.csdn.net/qq_38059635/article/details/81606977 1.文件写入关闭(注意操作程序目录地址) #简单文件写入程序 open write f= open('mytest1.txt','w 阅读全文
posted @ 2020-04-08 19:08 yescarf 阅读(255) 评论(0) 推荐(0) 编辑
摘要:一.怎么实现两个数值的交换 1.借用元祖进行交换 >>> a=22>>> b=33>>> a,b=b,a>>> a33>>> b22 2.引入中间值 >>> c=22 >>> d=23 >>> e=0 >>> e=c >>> c=d >>> d=e >>> c 23 >>> d 22 二、a+=a 阅读全文
posted @ 2020-01-08 15:32 yescarf 阅读(232) 评论(0) 推荐(0) 编辑

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