0

Python 数字

![](http://www.flayerveo.com/usr/uploads/2020/02/444572053.png) 一个类型的数字长度都一样。 ![](http://www.flayerveo.com/usr/uploads/2020/02/4006579081.png) 例: ```python a=10 a + 10L (整形+长整型) = 20L (长整型) 10L + 5.3(长整型+浮点) = 15.3 (浮点) 5.3 + 4+- 阅读剩余部分 -
0

Python 数学计算

import numpy ```python numpy.square(a) //a的a次方 numpy.sqrt(a) //a的完全平方 pow(a, b) //a的b次方 ``` import math ```python math.sqrt(a) // a的完全平方 ``` ##求绝对值: 函数:abs 语法:abs( x ) ##abs() 方法的实例: ```python print "abs(-45) : - 阅读剩余部分 -
0

Python 输入与输出

输入内容: Python2:raw_input() Python3:input() print 输出内容 技巧: print 输出内容, #加个末尾逗号使输出不换行   ####Python字符串操作符(%s,%d,%u...)与输出格式控制(*-+#0...) ![](http://www.flayerveo.com/usr/uploads/2020/02/1091571345.png) ([转译格式] % [数值]): 做转- 阅读剩余部分 -
0

Python 目录操控

创建目录: os.mkdir(path) 创建多级目录: os.makedirs(path) 删除空目录: os.rmdir() 删除非空目录: import shutil shutil.rmtree(path)
0

Python 模块

##模块的含义: 一个模块就相当于一个类,如os是一个类,os.system就相当于调用改类的类方法(system) 例: ```python from ftplib import FTP ftptest = FTP() //这里创建了一个类实例,实例名为"ftptest" ``` ![](http://www.flayerveo.com/usr/uploads/2020/02/2896556888.png) 注意:python的脚本名不能和导入的模块名一样- 阅读剩余部分 -
0

Python 正则表达式

#python正则表达式: ![](http://www.flayerveo.com/usr/uploads/2020/02/2380661919.png) (re模块) ![](http://www.flayerveo.com/usr/uploads/2020/02/518928904.png) pattern=re.compile(r‘string’) 创建一个需要比较的对象即原文本 b=re.match(pattern,‘string and’) ‘i- 阅读剩余部分 -
0

Python 面向对象-类

![](http://www.flayerveo.com/usr/uploads/2020/02/334219117.png) ![](http://www.flayerveo.com/usr/uploads/2020/02/1642676218.png) ![](http://www.flayerveo.com/usr/uploads/2020/02/1717325447.png) myclass(类名称) max=10(类属性:与实例无关) pri- 阅读剩余部分 -
0

Python 面向对象-继承派生重载

#继承派生重载 举例: 继承:原来就会就拥有的东西,如:名字 语言 派生:后天可以修改的东西, 如:职业 ##继承派生: ·给予子类:class subClass(Parent1(父类,可多个)[,Parent2,Parent3...(子类)]) ![](http://www.flayerveo.com/usr/uploads/2020/02/1274923656.png) 子类调用父类的方法: ![](http://www.flayerveo.com- 阅读剩余部分 -
0

Python 逻辑控制

#Python的逻辑控制: ##if/else/elif ![](http://www.flayerveo.com/usr/uploads/2020/02/4072595977.png) 例1: ```python a=10 if(a=10): print a ``` 例2: ```python If(a and 0): Print “null” (a and 0为0结果为空,不显示) If(a and 1): Print “t- 阅读剩余部分 -
0

Python 进程-进程间的通讯

#进程间的通讯 ##无名管道和有名管道: ####无名管道: ![](http://www.flayerveo.com/usr/uploads/2020/02/3783160635.png) ![](http://www.flayerveo.com/usr/uploads/2020/02/2800061527.png) ![](http://www.flayerveo.com/usr/uploads/2020/02/1123461618.png):创建管- 阅读剩余部分 -
0

Python 进程-进程的基本概念

![](http://www.flayerveo.com/usr/uploads/2020/02/1161872917.png) ![](http://www.flayerveo.com/usr/uploads/2020/02/195435522.png) ![](http://www.flayerveo.com/usr/uploads/2020/02/796384812.png) 即如果cpu是单核的话一次最大执行一个进程,剩下的进程处于等待状态,进程的执行有- 阅读剩余部分 -
    页码:
ICP证: 浙ICP备2022036136号