随笔分类 -  Python

1
摘要:python基础-异常处理 阅读全文
posted @ 2021-02-07 17:03 橙子Cjw 阅读(219) 评论(0) 推荐(0) 编辑
摘要:python基础-中文编码 阅读全文
posted @ 2021-02-07 14:37 橙子Cjw 阅读(259) 评论(0) 推荐(0) 编辑
摘要:pyhton使用 openpyxl 操作Excel 阅读全文
posted @ 2021-02-05 22:25 橙子Cjw 阅读(3104) 评论(1) 推荐(0) 编辑
摘要:request模块对不同请求方式处理demo分享 阅读全文
posted @ 2021-02-01 09:40 橙子Cjw 阅读(656) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-09-15 13:54 橙子Cjw 阅读(116) 评论(0) 推荐(0) 编辑
摘要:1、【win64】 pip install pytesseract pip install pli 提示: Could not find a version that satisfies the requirement PIL 故: pip install wheel pip install Pil 阅读全文
posted @ 2020-09-05 19:34 橙子Cjw 阅读(390) 评论(0) 推荐(0) 编辑
摘要:正则表达式: #正则表达式 #键盘数字6上的符号,^表示行的开始,$ 表示行的结束 #test = "tm queal Tomorrow Moon" ''' ^tm #匹配tm开头的文字 $tm #匹配 ''' # 元字符 # /b /w ''' #字符类 [0-9] 等价于 \d[a-z0-9A- 阅读全文
posted @ 2020-04-08 20:00 橙子Cjw 阅读(221) 评论(0) 推荐(0) 编辑
摘要:正则表达式: #正则表达式 #键盘数字6上的符号,^表示行的开始,$ 表示行的结束 #test = "tm queal Tomorrow Moon" ''' ^tm #匹配tm开头的文字 $tm #匹配 ''' # 元字符 # /b /w ''' #字符类 [0-9] 等价于 \d[a-z0-9A- 阅读全文
posted @ 2020-04-08 19:51 橙子Cjw 阅读(59) 评论(0) 推荐(0) 编辑
摘要:import readline import math import json ''' A: 第一行 第二行 第三行 ''' #从文件读取数据 with open("D:\A.txt") as f : content = f.read() print(content) # with open一个fi 阅读全文
posted @ 2020-04-07 10:41 橙子Cjw 阅读(221) 评论(0) 推荐(0) 编辑
摘要:import readline import math import json #py文件读取+异常处理 ''' A: 第一行 第二行 第三行 ''' #从文件读取数据 with open("D:\A.txt") as f : content = f.read() print(content) # 阅读全文
posted @ 2020-04-07 10:39 橙子Cjw 阅读(102) 评论(0) 推荐(0) 编辑
摘要:# 选择排序 # 一趟排序记录最小值,放到第一个位置 #再一趟排序记录记录列表无序区最小的数,放到第二个位置 #.... # 关键点:有序区、无序区、无序区最小值 #方法一 def select_Sort1(li): li2 = [] for i in range(len(li)): min_li 阅读全文
posted @ 2020-03-27 10:32 橙子Cjw 阅读(69) 评论(0) 推荐(0) 编辑
摘要:import time import datetime # 测试函数运行时间 def cal_time(fn): """计算性能的修饰器""" def wrapper(*args,**kwargs): starTime = time.time() f = fn(*args,**kwargs) end 阅读全文
posted @ 2020-03-26 16:58 橙子Cjw 阅读(120) 评论(0) 推荐(0) 编辑
摘要:import random """ 排序:将一组无序记录序列调整为有序记录序列 列表排序:将无序列表调整为有序列表 输入:列表 输出:有序列表 升序与降序 内置函数sort() """ #冒泡排序 bubble Sort #1、列表每两个相邻的两个数,若前面比后面的大,则交换这个数 #2、一趟排序完 阅读全文
posted @ 2020-03-26 16:38 橙子Cjw 阅读(90) 评论(0) 推荐(0) 编辑
摘要:import json import requests #获取北京天气 # #url= "https://wis.qq.com/weather/common?source=xw&weather_type=forecast_1h|forecast_24h|index|alarm|limit|tips& 阅读全文
posted @ 2020-03-25 23:01 橙子Cjw 阅读(339) 评论(0) 推荐(0) 编辑
摘要:递归的两个特点 调用自身结束条件 # _*_coding:utf-8 ''' 递归实例:汉诺塔问题 n 盘子总数 a 第一个柱子 b 第二个柱子 c 第三个柱子 n个盘子时: 1、将n-1个盘子,从A经过C移动到B 2、把n-1个盘子,从A移动到C 3、把n-1个盘子,从B经过A移动到C ''' # 阅读全文
posted @ 2020-03-24 11:28 橙子Cjw 阅读(89) 评论(0) 推荐(0) 编辑
摘要:7.什么是 PEP8? 8.了解 Python 之禅么? 9.了解 docstring 么? 10.了解类型注解么? 11.例举你知道 Python 对象的命名规范,例如方法或者类等 12.Python 中的注释有几种? 13.如何优雅的给一个函数加注释? 14.如何给变量加注释? 15.Pytho 阅读全文
posted @ 2019-09-11 14:40 橙子Cjw 阅读(156) 评论(0) 推荐(0) 编辑
摘要:语言特性 谈谈对 Python 和其他语言的区别 简述解释型和编译型编程语言 Python 的解释器种类以及相关特点? Python3 和 Python2 的区别? Python3 和 Python2 中 int 和 long 区别? xrange 和 range 的区别? 1. 谈谈对 Pytho 阅读全文
posted @ 2019-07-11 08:22 橙子Cjw 阅读(122) 评论(0) 推荐(0) 编辑
摘要:#2.Python如何实现单例模式?其他23种设计模式python如何实现? #第一 使用__metaclass__(元类)的高级python用法 #使用装饰器(decorator), #这是一种更pythonic,更elegant的方法, #单例类本身根本不知道自己是单例的,因为他本身(自己的代码 阅读全文
posted @ 2018-12-18 14:56 橙子Cjw 阅读(194) 评论(0) 推荐(0) 编辑
摘要:Python基础 列表 # 1. 列表是什么 # 2. 访问列表元素 # 3. 使用列表中的值 # 4. 修改,添加和删除元素 # 5. 组织列表 # sort()对列表永久性排序 # sorted()对列表临时排序 # 将列表倒过来打印 # 确定列表的长度 # 使用列表避免索引错误 #列表是什么? 阅读全文
posted @ 2018-12-18 14:12 橙子Cjw 阅读(76) 评论(0) 推荐(0) 编辑

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