运算符 1.算数运算符 运算符描述实例 + 加 - 两个对象相加 a + b 输出结果 30 - 减 - 得到负数或是一个数减去另一个数 a - b 输出结果 -10 * 乘 - 两个数相乘或是返回一个被重复若干次的字符串 a * b 输出结果 200 / 除 - x除以y b / a 输出结果 2 ...
分类:
编程语言 时间:
2021-03-09 13:03:47
阅读次数:
0
安装: https://www.cnblogs.com/lvtaohome/p/11121377.html 参考这位博主的文章 环境变量配置 https://www.cnblogs.com/lvtaohome/p/11121701.html 也是他的哦 刺激不? ...
分类:
编程语言 时间:
2021-03-09 13:02:20
阅读次数:
0
前言: 在开发中经常会与时间打交道,如:获取事件戳,时间戳的格式化等,这里简要记录一下python操作时间的方法。 python中常见的处理时间的模块: time:处理时间的模块,如获取时间戳,格式化日期等 datetime:date和time的结合体,处理日期和时间 calendar:日历相关的模 ...
分类:
编程语言 时间:
2021-03-09 12:54:15
阅读次数:
0
在python文件开头加上以下一段代码,即可解决中文编码问题,屡试不爽 # encoding=utf8 import sys reload(sys) sys.setdefaultencoding('utf8') ...
分类:
编程语言 时间:
2021-03-08 14:23:06
阅读次数:
0
第一种 类似于python的re.search("\d+","123") import java.io.*; import java.util.*; import java.util.regex.*; public class test { public static void readFile() ...
分类:
编程语言 时间:
2021-03-08 14:20:53
阅读次数:
0
一、类的初始 1.类的结构 class Human: """ 此类主要是构建人类 """ mind = '有思想' # 第一部分:静态属性 属性 静态变量 静态字段 dic = {} l1 = [] def work(self): # 第二部分:方法 函数 动态属性 print('人类会工作') c ...
分类:
编程语言 时间:
2021-03-08 14:14:08
阅读次数:
0
quickSort def partition(arr,low, high): i=(low-1) p=arr[high] for j in range(low, high): if arr[j]<=p: i+=1 arr[i],arr[j]=arr[j],arr[i] arr[i+1],arr[h ...
分类:
编程语言 时间:
2021-03-08 14:00:56
阅读次数:
0
阅读目录: 元类 元类实现ORM 元类 1. 类也是对象 在大多数编程语言中,类就是一组用来描述如何生成一个对象的代码段。在Python中这一点仍然成立: >>> class ObjectCreator(object): … pass … >>> my_object = ObjectCreator( ...
分类:
其他好文 时间:
2021-03-08 13:48:08
阅读次数:
0
Programming languages can be distinguished by several characteristics, but one of the most important is the nature of their type system. Python could ...
分类:
编程语言 时间:
2021-03-08 13:34:24
阅读次数:
0
from PyPDF2 import PdfFileWriter, PdfFileReader # 开始页 start_page = 0 # 截止页 end_page = 5 output = PdfFileWriter() pdf_file = PdfFileReader(open("3.pdf" ...
分类:
编程语言 时间:
2021-03-08 13:30:17
阅读次数:
0