本节大纲:

1 python程序由包(package)、模块(module)和函数组成。包是由一系列模块组成的集合。模块是处理某一类问题的函数和类的集合。

2 包就是一个完成特定任务的工具箱。

3 包必须含有一个__init__.py文件,它用于标识当前文件夹是一个包。

4 python的程序是由一个个模块组成的。模块把一组相关的函数或代码组织到一个文件中,一个文件即是一个模块。模块由代码、函数和类组成。导入模块使用import语句。

5 包的作用是实现程序的重用

一:在执行list()函数或者dict()函数首先是调用list()函数或者dict()方法会自动调用该函数的__init__方法进行数据的初始化,list()函数通过一个可迭代的对象,用for循环进行遍历插值。

 list_test=list((,,,))
print(list_test)
[, , ]

上述的过程:首先list()函数调用本身的__init__方法进行数据的初始化,通过for循环,把元组(1,2,3,) 遍历插入列表[1,2,3,]

二:集合

集合是无序数据类型,元素不可以重合。如果集合内元素重复会自动去重。用大括号表示和字典表示一样,字典是无序的数据类型,但是key-value的映射。

 set_a=set([1,2,2,3,])
print(set_a) {1, 2, 3}

可以通过内部函数set()对集合进行转换。字典、字符串、列表都可以转换成集合。

 set_b=set({'name':'evil',})
set_c=set('evil')
set_d=set([1,2,3,])
print(set_b,set_c,set_d) {'name'} {'i', 'l', 'e', 'v'} {1, 2, 3}

1、操作集合

 1)add()函数。添加元素给集合。

 s_tets=set()
s_tets.add(456)
s_tets.add(456)
s_tets.add(456)
print(s_tets)
{456}

应用场景:爬虫。在返回url保存的时候可以用集合操作,默认去除重复的元素。

2)difference()函数。比如a.difference(b)表示a存在元素b不存在元素。但是a和b本身的集合不发生改变。

 s1_testa={1,2,3,}
s2_testb={2,5,6,}
print(s1_testa.difference(s2_testb))
print(s2_testb.difference(s1_testa))
print(s2_testb,s1_testa) {1, 3}
{5, 6}
{2, 5, 6} {1, 2, 3}
3、symmetric_difference()函数,比如a.symmetric_difference(b)表示a和b集合去掉交集部分的结合。并不能改变集合a和b的值。
s1_testa={1,2,3,}
s2_testb={2,5,6,}
print(s1_testa.symmetric_difference(s2_testb))
print(s2_testb,s1_testa)
{1, 3, 5, 6}
{2, 5, 6} {1, 2, 3}
3)上述的操作不能修改原集合的值。如果想修改原集合的值。用如下函数:a.difference_update(b)函数。会修改集合a的值。b值不变。a值会变成。a存在的元素且b不存在的元素的值。
 set_a={1,2,3,4,}
set_b={'c',6,3,5,}
set_a.difference_update(set_b)
print(set_a)
print(set_b)
{1, 2, 4}
{'c', 3, 5, 6}
4)同样a.symmetric_difference_update(b)函数也会修改a的值,使a的值变为,a、b集合的去除公共元素的集合。
 set_a={1,2,3,4,}
set_b={'c',6,3,5,}
set_a.symmetric_difference_update(set_b)
print(set_a)
print(set_b)
{1, 2, 4, 5, 6, 'c'}
{3, 5, 6, 'c'}

5)删除集合指定元素。discard()函数。如果该元素不存在不会报错。

 set_a={1,2,3,4,}
set_a.discard(1)
print(set_a)
set_a.discard(111)
print(set_a)
{2, 3, 4}
{2, 3, 4}

同样也可以用remove()函数,但是不存在元素会报错。KeyError: 111

 set_a={1,2,3,4,}
set_a.remove(111)
print(set_a)
set_a.remove(111)
KeyError: 111 set_a={1,2,3,4,}
set_a.remove(4)
print(set_a)
{1, 2, 3}

也可以用pop()函数删除元素。但是随即删除一个元素。

 set_a={1,2,3,4,5,6,7,8}
set_a.pop()
print(set_a) {2, 3, 4, 5, 6, 7, 8}

6)批量添加元素。用update()函数。通过for循环对迭代的对象(比如说列表,字符串,字典的keys以及字典的value值),进行add()操作添加。

 1 set_a=set()
2 list_a=[1,2,3,4,5,4]
3 set_a.update(list_a)
4 print(set_a)
5 {1, 2, 3, 4, 5} set_a=set()
set_b=set()
list_a={'name':'evil','age':22}
list_b={'name':'evil','age':22}
set_a.update(list_a)##默认对key值进行迭代。
print(set_a)
set_b.update(list_b.values())
print(set_b)
{'name', 'age'}
{'evil', 22}

7)当我们在执行一些列表或者其他操作的时候,会调用list()函数的一些方法。比如:

 list_a=[1,2,3] ##调用list的__init__方法
print(list_a[0])##调用list的__getitem__方法
list_a[0]=44##调用list的__setitem__方法
del list_a[2]##调用list的__delitem__方法

8)在写列表或者字典、集合、元组的时候,进行最后元素加个逗号,在以后django学习的过程中不加逗号有时候会报错。

 list_a=[1,2,3,]
dict_a={'a':2,'b':3,}
tuple_a=(1,2,3,)
9)集合的并集、交集。

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaYAAADiCAIAAACKrfSaAAAKfElEQVR4nO3dT47iVgLHcZY5RBa1yClY5Qg5BcotsoqyZZcr9AnIMXIALjDSqLOYidTSKJJnUfwxYIwNtp/N7/PRW3RXU5Tfg/eVAVey+uu//zMMwwgZq+JHYBiGMdmQPMMwgobkGYYRNCTPMIygIXmGYQQNyTMMI2hInmEYQaMteRXAe5E8IIjkAUEkDwgieUAQyQOCSB4QRPKAIJIHBJE8IIjkAUEkDwgieUAQyQOCSB4QRPKAIJIHBJE8IIjkAUEkDwgieUAQyQOCSB4QRPKAIJIHBJE8IIjkAUEkDwgieUAQyQOC9Eje39/+KXKIAEPpmry/v/0jecDSdUreZ+8kD1i6x8k79U7ygKV7kLx67yQPWDrJA4K0Je+qd5IHLF1b8v7913+uxr86Kz0vgAaSBwSRPCCI5AFBJA8IInlAkLGSp3rADEkeEETygCAPfuFM8oB3InlAEMkDgkgeEETygCCSBwTxnwgFgkgeEETygCD+D2dAEMkDgvhfdwNBOiWvOlav1FECDKJr8qqqkjxg6XokD8pavab04TMLkse8tDTr6/c/vDKkkEryKGiMrg2VwtJrw1gkj6kVrNtzHSy9YAxJ8phC2fO4ofJXehUZgOQxlkVnzqnfu5K8ubj35noXpY/9wptl7mH+Sq83/Uje1O5la6izj1I1DCmd9i2d5I1o8LQNVcMxplk8PcWH8C2C5A1v/uc7Q+Vv5tMsuLZDPZcYnOQNo+B53CBbtO8uXeJMp1/VkZ5svELynrfczLXs0od79W3mO9mSTvaEpAvJ6+2dMte+V2+363vPerzFLPJEpZHk9fD2pWvcrp87NnDuYywjxUneYwmndV12bPIKDLWMpZ/LSF4r+3zVpPhRLXc43StO8prZ219br3C2OC8ubOkneC7Ju2Y/n7ZlF8WPc6FD9UqRvA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4NnkXb1/duQiv7U6Ol8Ct1/cz0HQVyKOZnM/AaldcHy7Nqf+InhO8+TGrhvn2niD0IHm9nc9BHp7t3D8trH/b5z833W3LfV/k8fy67/ZSuXNcOpSi4Q3Gze7ij5dT6jPBy+O+OtzbGXaeIPQheT1cvaPU9vqroTjNaten7ZtfBd67Lq+252/e6rr6da7TQTzqxH6/rf1Cb+2ji91mtdps94c/rre7/e1FdG0TrN2q6RjqS3n4jY9eE4SuJC/E5YUhkErygCCSBwSRPCCI5AFBJA8IInlAEMkDgkgeEETygCCSBwSRPCCI5AFBJA8IInlAEMkDgkgeEETygCCSBwSRPCCI5AFBJA8IInlAEMkDgkgeEETygCCSBwSRPCCI5AFBJA8IInlAEMkDgkgeEETygCCSBwSRPCCI5AFBJA8IInlAEMkDgvwfUsQnfGYwCFoAAAAASUVORK5CYII=" alt="" />

交集函数:a.intersection(b)和a.intersection_update(b)前一个函数不改变原先集合(a,b)的值,后一个更新被交集的集合(a)。

 s1_testa={1,2,3,}
s2_testb={2,5,6,}
s3=s1_testa.intersection(s2_testb)
print(s3,s1_testa,s2_testb)
{2} {1, 2, 3} {2, 5, 6}
s1_testa={1,2,3,}
s2_testb={2,5,6,}
s1_testa.intersection_update(s2_testb)
print(s1_testa,s2_testb)
{2} {2, 5, 6}

并集函数:a.union(b)

 s1_testa={1,2,3,}
s2_testb={2,5,6,}
s3=s1_testa.union(s2_testb)
print(s3,s1_testa,s2_testb)
{1, 2, 3, 5, 6} {1, 2, 3} {2, 5, 6}

10)练习:

在cmdb日常资产管理的时候,日常服务器检测硬件信息收集中,如果一个服务器4个内存插槽,#1、#2、#4插槽分别插,4G、8G、16G。如果现在变化#1插槽变为16G,#2不变,3#插槽插4G的,#4不插。该如何更新信息呢?

1、该删除那个元素?

2、该更新那个元素?

3、那个元素变了,需要更新?

 dict_old={
'#1':4,
'#2':8,
'#4':16,
}
dict_new={
'#1':4,
'#2':8,
'#3':4,
}

答案:

 1 set_old=set(dict_old.keys())##生成keys值得集合
2 set_new=set(dict_new.keys())
3 del_item=set_old.difference(set_new)##old有的new没有的
4 print('delete item %s'%del_item)
5 up_item=set_new.difference(set_old)##new有的old没有
6 print('add item %s'%up_item)
7 a=set_old.intersection(set_new)## old和new的集合
8 for i in a:
9 if dict_new[i]!=dict_old[i]:
10 print('update item: %s'%i)##交集的元素value值不相当,需要更新的。

三:函数:函数组成:

def functionname(parameter):###由关键字def进行定义,然后函数名字(functionname)和函数参数。

#function description ###函数的描述,作用;参数作用;

function body ##函数体,执行代码

 return value## 函数返回值。缺省值是None。

以下是发邮件代码:

 def sendmail():
try:
import smtplib
from email.mime.text import MIMEText
from email.utils import formataddr
msg = MIMEText('邮件内容', 'plain', 'utf-8')
msg['From'] = formataddr(["xxx",'xx@126.com'])
msg['To'] = formataddr(["走人",'xx@qq.com'])
msg['Subject'] = "主题" server = smtplib.SMTP("smtp.126.com", 25)
server.login("username", "password")
server.sendmail('xxx@126.com', ['xxx@qq.com',], msg.as_string())
server.quit()
except:
# 发送失败
return "失败"
else:
# 发送成功
return "cc" ret = sendmail()
print(ret)
if ret == "cc":
print('发送成功')
else:
print("发送失败")

执行顺序:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABBEAAAIFCAIAAAALDvKLAAAgAElEQVR4nOzdvW/kSILn/fg/xg5TfvuzwADh9Lo5d3a3tUCg2++jIWfmDpVYoxsIQCDQ7QkCKp0xeuRmtKebeuq5273Nma552dnp6pl7Zp1SlLIkSHqM4EuQDGYyM5kUM/X9gOhWMUkmkykx4seIIMUjAAAAALQTT70DAAAAAEaNzAAAAABgFTIDAAAAgFXEFQAAAAC0Ew4AAAAA2pEZAAAAAKxCZgAAAACwCpkBAAAAwCpkBgAAAACrkBkAAAAArEJmAAAAALAKmQEAAADAKmQGAAAAAKuQGQAAAACsQmYAAAAAsAqZAQflu+/cd9/dvHx589VXNy9f3rx86ay9fvv2+u3b3t/q+mfv3v1z71sFAAA4PGQGjMj127c+Fbz/5pubr766+eqrD59++uH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TFJxhhjiiytV1IaemxS4MsJ52aGoHy91sFWPTYHwLUYXTUPSainRLtVgjIzlOsmdaY9uCWF61FYn+CtRdSFhbBdldUbPDwYmwQAAIDHHJsZctWsqRrHEtvzaTtTogeuM2jlzFcupz5XW50oyonRzbbRRTkHupwVXR+tywv1hOk2kJj6gG+1IZs9Bmk6EYklvHILCOV+6V+J1Totsk9azEJ7j50iFteLsuYQzRfWAkr9vF+FzAAAAADbG3imW3ds0hAeCQ3zSKznJNhLIdU7o2k1QXnPqqzVHOielZTK6kQ07T402ilQOOni0C9CZgAAAIDt1WeGpK4wHDYv+cne9cClky4az3QDAADAAV59ZsCTo+0AAABgIzPARdsBAADARmaAi7YDAACAjcwAF20HAAAA2zNmBrbXuz3T/woAAAC8Rs+VGQAAAAC8DWQGAAAAAPuQGQAAAADsQ2YAAAAAsA+ZAQAAAMA+sgUAAACAfmQGAAAAAPuQGQAAAADsQ2YAAAAAsA+ZAQAAAMA+/weuDlN7G9qLNQAAAABJRU5ErkJggg==" alt="" />

 python在执行py文件的时候从上到下依次执行。上面的sendmail.py文件,首先执行1:定义一个函数sendmail() 并不执行函数体。而是往下执行,遇到函数依然这样执行,首先让解释器知道定义这个函数,到第2部分的时候,也就是函数的调用部分的时候,
解释器会跳到该程序sendmail()函数部分,并给sendmail的形参传入相应的参数值。执行函数体,也就是标记的3部分。当函数体执行完之后,返回函数值赋值给ret值。然后程序往下执行,第4部分。
1)函数一旦执行return语句的时候,函数立即终止。不会执行函数体下面的代码。
 def  test():
print(1+1)
return True
print(222) if __name__=='__main__':
test()
2

2)函数的参数:
1、普通参数(严格按照顺序,讲实际参数赋值给形式参数)
2、默认参数(必须放置在参数列表的最后)
3、指定参数(将实际参数赋值给指定形式参数)
4、动态参数:
  * 默认传入的参数。全部放在元组中。
  ** 默认传入的参数。全部放在字典中。
1、有限的形参。
 def mon(x,y):###其中x,y是形参。
a=x+y
return a
res=mon(1,2)##给函数mon()传入实参。并执行函数体a=1+2 并返回a的值。赋值给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900wf5+QB/Ba/zAQAAAE1jkyfwAQAAAIAGhB8AAABoEP8PAZLz3I93EiUAAAAASUVORK5CYII=" alt="" />
1)首先读取程序定义函数mon()部分。
2)然后执行mon(1,2)函数调用部分并给函数mon(x,y)的形参传入实参(1,2)再执行3部分的函数体,执行函数体并函数返回a的值 。
3)返回a的值 并赋值给res变量,这是执行第4步。
4)然后执行第5部分打印输出res变量。

需要注意的是:

1)在有限的形参的函数,在给传入实参的时候,实参的个数和形参的个数必须一致。

2)实参和形参 是一一对应的。如果没有默认参数的情况下,数目必须一致。

否则会报错:TypeError: mon() missing 1 required positional argument: 'y'。

2、默认参数:

在函数的定义的过程中,可以给形参定义缺省值。如果该形参没有传入实参的时候会用缺省值。如果传入的实参个数和形参的个数一致的时候,不会使用缺省值。

 def mon(x,y=9):
a=x+y
return a
res=mon(1)
res1=mon(1,4)
print(res)
print(res1)
10
5

默认情况未指定实参数位置,实参传入会从左到右 一次匹配形参。如果你指定默认参数位置的时候,未指定参数按默认形式匹配,指定的参数会按指定匹配。如下所示。

 def mn(a,b=2,c=2):
SUM=a+b+c
return SUM res=mn(1,2)
res1=mn(1)
res2=mn(1,c=3)####默认是从形参的开头从左到右一次匹配。
print(res,res1,res2) 5 5 6

需要注意:

默认参数的位置必须在最后,比如上面的 不可以这么写:def mon(y=9,x)这样会报错!!

3)指定参数:

当我们用形参的时候,在传入实参的时候不指定位置的时候,会依次对应。如果在传入实参的指定参数的时候,实参的位置的可以无序的。比如:

 def mon(x,y=9):
a=x+y
return a
res=mon(x=1)
res1=mon(x=1,y=4)
res2=mon(y=2,x=4)
print(res)
print(res1)
print(res2)
10
5
6

4)不固定参数。*args

 def mn(*args):
print(args,type(args))
mn(1,2,3,4,)
mn([1,2,3,4,]) def mn_1(args):
print(args,type(args))
mn_1([1,2,3,]) (1, 2, 3, 4) <class 'tuple'>
([1, 2, 3, 4],) <class 'tuple'>
[1, 2, 3] <class 'list'>

如果想传入的参数是字典。该怎么办呢???

 def mn(*args):
return args dic={'a':2,'b':3}
res=mn(*dic)
print(res) ('b', 'a') ###这种情况 只能传入字典的key值 形式元组。

同样如果这么处理的话,传入的列表。不在是由传入列表组成的元组。而是把列表中的元素 变为元组的元素。

 def mn(*args):
return args 4 list_1=[1,2,3,4,]####传入的是列表的实参 直接转成元组的。而不是([1,2,3,4,])
5 res=mn(*list_1)
print(res) (1, 2, 3, 4)

也就是说,在形参不带*和不带*区别:

  1)args:不带*的参数,在传入实参的时候 ,传入的实参的个数也是一个。需要数目一致。传入的实参的数据类型是什么,赋值之后数据类型就不会改变。

  2)*args:带*的参数,在传入实参的时候,实参的个数可以是一个,多个。没有个数的限制。但是传入的实参,最后赋值之后,会形式一个元组形式的元素组成,,无论你传入是字符串、数字、列表还是字典。元素保持传入实参的数据类型,比如是列表,传入时候元组是由列表元素组成。

 def mn(*args):
print(args,type(args))
mn(1,2,3,4,)
mn([1,2,3,4,],2)
mn({
'name':'evil',
'age':22,
}) (1, 2, 3, 4) <class 'tuple'>
([1, 2, 3, 4], 2) <class 'tuple'>
({'age': 22, 'name': 'evil'},) <class 'tuple'>
5)带**形参形式。
这种形式的参数必须要传入这种形式的:key=value。否则报错。形参赋值之后是由元素的组成的字典。
 def mk(**args):
return args res=mk(a=2,)
res1=mk(op={
'age':21,
'name':'tom',
})
print(res,type(res))
print(res1,type(res1))
{'a': 2} <class 'dict'>
{'op': {'name': 'tom', 'age': 21}} <class 'dict'>

如果传入的实参是字典,不是key=value  该如何处理呢???

 def mn(**kwargs):
return kwargs dic={'a':2,'b':3}
res=mn(**dic)#####需要注意进行调用的时候进行**形式进行形参的赋值。
print(res) {'a': 2, 'b': 3}

6)万能参数:(格式*在**前面)

 def mn(*args,**kwargs):
return args
def mn1(*args,**kwargs):
return kwargs res=mn(1,2,3,)
print(res,type(res))
res_1=mn1(a=2)
print(res_1,type(res_1)) (1, 2, 3) <class 'tuple'>
{'a': 2} <class 'dict'>

也就说,当形参:(*args,**kwargs)形式的时候,当传递参数不固定的字符串、列表、字典等,则赋值给形参args并形成一个元组。而传递实参是key=value形式的时候,则赋值给:kwargs 形成一个字典。

我们称这种形参方式叫做万能参数(自己称呼)。

 def mn(*args,**kwargs):
print(args)
print(kwargs) res=mn(1,2,3,a=2,c=3,) (1, 2, 3)
{'c': 3, 'a': 2}

也就是说:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAASAAAACwCAIAAAAg8CQgAAATGUlEQVR4nO2dbawc1XnHR+mHfm8/lhJeOklEVUIIRJeXK+oUiBmUQmLzXmjLuy8Fjd1abRqaXFJVrVTgBowSD3Y3iWpCkFttqgiQjZKg3LHLBwsFREMuwVWUQuyEEOU+/zP29V3Z7ofZmZ3ZndmdtzOzL/+fjLjePXvmuevnP8+Zc85zHuMQIUQbhkcI0QYFRohGKDBCNEKBEaIRCowQjVBghGiEAiNEIxQYIRqhwAjRCAVGiEYoMEI0QoERohEKjBCNUGCEaIQCI0QjFBghGqHACNEIBUaIRigwQjRSQGAr9tKisdhyMn/AtU8ZxslR7dct47RhnDaM06a9lt+qdBzLtN2YOVbs7/WSePW+F13bNAwr+xdcNc1+Q9NFboE5rUVr2XNaOQTmeZ5jjRKYc1KPR7m22evYcZzQfRynbg9OvHqKSY7VoMDiXxopQ8EhYiaBuR3TD0rWek9gzkmjG6lOhXdJxzodvHjaMDspN0/XNg3DNE3DMCzHsQzDMG3X8xzLMEzLMg0jeKXvQxFXcW2/WbypYw285Dc0bdd/L+gi+LxpO5EgE37esobKIvHqySYFAuu+2/39wvcjVukx3rXNga+y25bKy4U+ga1bwbAwMkRct3r6if6cMYI5lmE5nudYhmm74UjGtc3uP/vAnTfBUVzbNM3YEKgXTWKDSV/QttsLMFbUK4OmvfFUz450Bq+e/GIQwRx74DLxv2oyPjGGUWD50SawmGDWbPOk40XDV38Qyyqw7l27e3sPBGb14kG/n/Y5RCjRWLRIiiEJfUW6inQQiUGjfoWkq6e96EfpaJy1nPDprGebJuOTQxjJTb0CcztW2gRGTQJL6jMyiLIK+Kg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bDA4ezXJsW7bo4bSCoddiJpfMFBiTkpdL6MvzVmyzOz60rNHThpnsTMvR9iiw6UD7QnNFw7OqKH8eVW1QYNOAdoGVChmVMzGHA3CheUrgVilCNEKBEaIRCowQjVBghGiEAiNEIxQYIRqhwAjRCAVGiEYoMEI0QoERohEKjBCNUGCEaIQCI0QjFBghGqHACNEIBUaIRigwQjRCgRGiEQqMEI0Yhwgh2vh/PCaRlqH015IAAAAASUVORK5CYII=" alt="" />

按上图的所示进行实参的赋值。

3)format()函数字--符串的初始化:

2种形式:

1、

 name='evil'
age=''
id=1318
pre='''
This is %s information:
NAME:%s
AGE:%s
ID:%s
'''%(name,name,age,id)
print(pre) this is evil information:
NAME:evil
AGE:22
ID:1318

2:用formate()函数进行初始化。如上的例子修改为:

 name='evil'
age=''
id=1318
pre='''
This is {0} information:
NAME:{1}
AGE:{2}
ID:{3}
'''.format(name,name,age,id)
print(pre) This is evil information:
NAME:evil
AGE:22
ID:1318

其中有{num}比如上面的{0},{1}....是占位符。与后面的变量的依次对应。

需要注意的是其中0,1,2,3的数字对应后面的变量(name,name,age,id)所形成的元组的索引或者是字典的key值。不能随便修改成下面。会报错的或者显示的效果不是我们想要的。

 name='evil'
age=''
id=1318
pre='''
This is {1} information:
NAME:{2}
AGE:{2}
ID:{3}
'''.format(name,name,age,id)
print(pre) This is evil information:
NAME:22
AGE:22
ID:1318

或者报错:

name='evil'
age=''
id=1318
pre='''
This is {1} information:
NAME:{2}
AGE:{2}
ID:{4}
'''.format(name,name,age,id)
print(pre) Traceback (most recent call last):
File "C:/xx", line 9, in <module>
'''.format(name,name,age,id)
IndexError: tuple index out of range

format()函数结构:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzQAAADjCAIAAADcw8YqAAAgAElEQVR4nO2dy4scW57f86/ojf6Bvt5qcaMWhhmuuBcaDNJC0yBDQUNR4xmtLGjKm1EkdNkbuUvFwI2NpU1hDCVydVUueSUqWnL7gWbTNShr5AvmSrcEzsYWVVn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Xx9rpnDNWSihRGvIkuIsN+rWXk+sV1MfBQAAADCOteLM/xDv3FRst1zx9+PNm+vtkWDWMnWt+igAAACAcSwWZzefMQAAAIBpEGcAAAAAFmGZOEtMZYpfMAsAAACw0FgmzgAAAACWG8QZAAAAgEVoxBkAAAAA3CSIMwAAAACLQJwBAAAAWATiDAAAAMAiEGcAAAAAFoE4AwAAALAIxBkAAACARSDOAAAAACwCcQYAAABgEYgzAAAAAItAnAEAAABYBOIMAAAAwCIQZwAAAAAWgTgDAAAAsAjEGQAAAIBFIM4AAAAALAJxBgAAAGARiDMAAAAAi/j/othbSKJ6+LsAAAAASUVORK5CYII=" alt="" />

所以根据可以传递列表、key=value形式:

 info=['evil',22]
print('my name is {0} and age is {1}'.format(*info)) my name is evil and age is 22

用*info形式的进行传入实参。列表info会转换成('evil',22)的元组。然后进行索引的对应。

 info={'name':'evil','age':22}
print('my name is {name} and age is {age}'.format(**info)) my name is evil and age is 22

注意这种形式实参传入,其中的占位符是字典的key值,而不是索引!!! 传入的是字典不是元组了。也就是用format()函数的**kwargs参数。

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAApkAAABxCAIAAAARRS/DAAATaUlEQVR4nO2dT6gkx32AyxcfDCIit7AQEKFERMgxS0jQIYqIoE67YF8c2CVHY4l0btGeJodokxgyCKRAgxkMkiE4xCMbXRx25ZDXBJusE3IQ6Jn4IueJQBwCU9XweI/3ng/9r7q7qru6e2be9Oj7eLCz1dVdv673Zr7+Vdd0iRsAAACYM+K2AwAAAIBJ4HIAAIB5g8sBAADmDS4HAACYN7gcAABg3uByAACAeYPLAQAA5g0uBwAAmDfiGQAAAMwZkQIAAMCcweUAAADzBpcDAADMG1wOAAAwb3A5AADAvMHlAAAA8waXAwAAzBtcDgAAMG9wOQAAwLzB5QAAAPMGlwMAAMwbXA4AADBvcDkAAMC8weUAAADzBpcDAADMG1wOAAAwb3A5AADAvMHlAAAA8waXAwAAzJsRLj+NlguxWMVBlWMlVHDNHBklw6NKk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d+5ex+UAcCjkLh++sErH53v3p3yIy30vhkbYG9Wg+MNbTFv9M7DR3OXmjcrWlbk/NvqOMWmavl1qvlYzPC8P6eruHdv/DXd5d7u+pg8HXA4Ah8Jol2cM0m23y53KaWeu3T8hoXbEP1RpE/Ef0Jg72tZz5e9s82tZal6m77Ux+ZC8vCzp7knfr8xX0ntxEFite9OBgMsB4FDYostDkvL26+6tHfrvKA+vuUWXB15nhFUrhtPtIfR6tXyYPfN9McDePqnpebmvN5wlvb+7QR3eEdIhgMsB4FDYlssHFYa73FnSewGxVa32nJeP3sq+k0rTtBpjz/PvzOXG8Uv60OjXTC2DH5iXd+/Su2PvGXW7vONoKWPsAACB5C4fu7BKw4vpWBmMdvmgIEMq9Gbw3ccJvyzobLQYM//YaHsSXCnst01WWGTwNc0Pzct7T39cXu6sOcjlBw4uB4ADQr+wBZeX/w1PZzsy6e6aqd8cIUH2bh2tlvAB5LLck3pa97/f1tq6KZ7vYo2omze0fqP26wvMy8P7MNzlgY12l8wFXA4AB8QWXd4uDPSob5eO/DU8/e2IYUoW3rFX44LDF3Z4nB1U4/D1MLpHCAb1ZG+ozt+R8zQ7Apud1HE5ABwQU1wOt8zHnvvosHtwOQAcEPqFmeVDUNIeYIe9gcsB4JD49m0HADBDcDkAAMC8weUAAADzBpcDAADMG1wOAAAwb3A5AADAvMHlAAAA8waXAwAAzBvxDAAAAObMLwELuJFsqQlp3QAAAABJRU5ErkJggg==" alt="" />

4)关于函数的返回值。

一个函数的返回值是任意的可以是一个列表、一个字典、一个布尔值、数字、或者没有返回值。没有返回值的情况,缺省值是None。

返回值布尔值:如下简单登陆验证。

 dic_a={
'name':'evil',
'password':'',
}
def login(username,password):
if username==dic_a['name'] and password==dic_a['password']:
return True
else:
return False
if __name__=='__main__':
user=input('Entre your username:')
paswd=input('password:')
res=login(user,paswd)
if res:
print('Welcome to python')
else:
print('sorry login fail bye!') Entre your username:evil
password:22
Welcome to python

返回值列表:

 def chek():
user=input('entre your username:')
age=input('entre your age:')
addr=input('entre your adrr:')
return [user,age,addr]
if __name__=='__main__':
res=chek()
print('name:{0} age:{1},addr:{2}'.format(*res)) entre your username:tom
entre your age:22
entre your adrr:LianoNing
name:tom age:22,addr:LianoNing

返回值字典:

 def chek():
user=input('entre your username:')
age=input('entre your age:')
addr=input('entre your adrr:')
return {
'name':user,
'age':age,
'addr':addr
}
if __name__=='__main__':
res=chek()
print('name:{name} age:{age},addr:{addr}'.format(**res)) entre your username:evil
entre your age:22
entre your adrr:;LiaoNing
name:evil age:22,addr:;LiaoNing

没有返回值:

 def mn(x,y):
a=x+y res=mn(1,2)
print(res)
None

5)相同函数名字执行顺序:

 def mn(x,y):
a=x+y
return a
def mn(x,y):
a=x*y
return a
res=mn(1,2)
print(res)
2

相同的名字的函数,执行 临近函数调用最近的函数定义,如上。

6)函数传入给给形参的引用,形参引用实参,而不是内存中重新开辟一个值,赋给形参。

 def mn(x):
x.append(999)
list_1=[1,2,3,4]
mn(list_1)
print(list_1) [1, 2, 3, 4, 999]

当x进行操作的时候,添加元素999的时候,会更新list_1.

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAh8AAAC/CAIAAADRvClBAAALVElEQVR4nO3dP3LbRhsHYNwjPkFOkFFrH0CpnUnJsQ6QdN9XqI9HtX2A5AAadZn4AHYfj3r3HnfWvxSkKJICQJDcBZb7Ps+wsDWkSLz7Aj8BC4DNAwCk1kz9AQCokHQBID3pAkB60gWA9KQLAOlJFwDSky4ApCddAEhPugCQnnQBID3pAkB60gWA9KQLAOlJFwDSky4ApCddAEhPugCQnnQBID3pAkB60gWA9KQLAOlJFwDSky4ApCddAEhPugCQnnQBID3pAkB60gWA9KQLAOlJFwDSky4ApCddAEhPugCQnnQBMriaNU1zcnE94FlNM7sa50MxJukCZDAoXa4vToRLtaQLcLhFTmxxcnG93F8ZQuwcM+kCHG6eLk/7Ktv+/2DHpXrSBTjcZnrMd1CekuN5usyfsXVmhqMlXYDDbaTH49GvZby078s0s6ueA2WS57h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ANKTLgCkJ10ASE+6AJCedAEgPekCQHrSBYD0pAsA6UkXANKTLgCkJ10ASE+6AJCedAEgPekCQHrSBYD0pAsA6UkXANKTLgCkJ10ASE+6AJCedAEgvf8APwJYoIAkm6gAAAAASUVORK5CYII=" alt="" />

7)函数的变量:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAR8AAADSCAIAAAD8NFPEAAAJcUlEQVR4nO2dS5KjvBJGtS4WpPVoNZregSe9BxbwL0N3wEMCY5xJkUjgc+KL6GoXJWSUx8mjotslALDB1Z4AwGPBLgArsAvACuwCsAK7AKzALgArsAvACuwCsAK7AKzALgArsAvACuwCsAK7AKzALgArsAvACuwCsAK7AKzALgArsAvACuwCsAK7AKzALgArsAvACuwCsAK7AKzALgArsAvACuwCsAK7AKzALgArsAvACuwCsAK7AKzALgArsAvACuwCsAK7AKx4rF0OHk3t+hJxj1nKmY/+v//9Rx6cW2jW9ORUINVvpmXHGp2WFrz68bQpWItzUkHLIkMaFKy5CanAK1KmNcHamo0W7CKrNCVYQ1PRglpkM+0I1so8tKAW2UkjgjUxiQNgF9kJdh0HtcjXtCBY/RkcALvI12DXQbCLfA12HQG1iDDVBcMu8thglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJglxrsIsJgl5oft8udTfV3ZHqsKtdq3d0f4NkFUVbGJq+zebB12KXmGQv/XgfWFv3duupH6cBRrVyrdXd/gDsu81edaqsk4namYZeauyztA3Ta4RZtDbvUNLuW+1LV1sGWNjXDLjWtLeEvS/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1mCXBHsAvACuwCsAK7AKzALgArsAvACuwCsAK7AKzALgArsAvACuwCsAK7AKzALgArsAvACuwCsAK7AKzALgArsAvACuwCsAK7AKzALgArsAvACuwCsOL/rksgQmt3DJMAAAAASUVORK5CYII=" alt="" />

全局变量:所有作用域都可读。

对全局变量进行重新赋值,需要global

全局变量要大写。比如:NAME .....

私有变量:在函数里的变量是私有的,作用域只在函数体内。

全局变量作用域全局,如上所示。

私有变量:

 def sum(x,y):
a=2
b=a+x+y
print(b)
return b
def a(x,y):
print(b)
sum(1,2)
a(1,2) NameError: global name 'b' is not defined
5

如果私有变量超出函数体的时候,别的函数调用这个变量会出现错误。如上所示。

可以把私有变量变为全局变量,如下所示:

 def sum(x,y):
a=2
global b
b=a+x+y
print(b)
return b
def a(x,y):
print(b)
sum(1,2)
a(1,2)
5
5

注意:global 变量名,变量名赋值。这种写法,不要:先变量名,然后global 变量。这样会抛出一个warning 异常。

 def sum(x,y):
a=2
b=a+x+y
global b
print(b)
return b
def a(x,y):
print(b)
sum(1,2)
a(1,2) SyntaxWarning: name 'b' is assigned to before global declaration global b
5
5

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAiAAAAD4CAIAAABaGcogAAAX3klEQVR4nO3dvW7byBrGcd7HqXkP6dfVNK7Xu3XUDuJTC2qTU6iKADYC4tQrtXFa0RfgUkBc+wI21Jdh+xT8ED9myCGloSjx/wOBlSlS4i4WejAvOfM6AQAAFjinvgAAwGUiYAAAVhAwAAArCBgAgBUEDADACgIGAGAFAQMAsIKAAQBYQcAAAKwgYAAAVhAwAAArCBgAgBUEDADACgIGAGAFAQMAsKJBwCzleOSMpl75UZ5wMlzpF3cKL3+0K4RQHelKv+zbfOmaHJb38LAdDOqcAAAwVTtgvOlILAJvWh0wwguCwJdC+sk/gsAT+wyIDsns9EQcRcrTlXzpRlHlS1dUXFfk4WE7GLx8+PDy4YPR8QCAmhqWyKoDJpKPhjBLcnvTqVN+euW3VQdMKloIGACwp/2AUZa89iWy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+nTLwAQO8wggEAWHFAwJS+lT9SkDAA0C91A2Ypx/HDY8u5W9Y4OdUxOd08GQDQD3U7WgapppaVjykn/SyJFwDoHSZaAgCsIGAAAFYQMAAAKwgYAIAVBAwAwAoCBgBgBQEDALCCgAEAWPF/9dj83uThL1YAAAAASUVORK5CYII=" alt="" />

8)函数的注释:

注释:包括函数的功能。参数的说明。以及返回值的说明。好的description帮助别人能快速了解你的代码。

 USER_INFO={
'name':'evil',
'age':'',
}
def login(username,password):
'''
用户登录
:param username:用户名字
:param password:用户密码
:return:True表示登录成功,False表示登录失败。
'''
if username==USER_INFO['name'] and password==USER_INFO['age']:
return True
else:
return False if __name__=='__main__':
user=input('Entre your login:')
paswd=input('Entre your password:')
res=login(user,paswd)
if res:
print('Welcome to Python!!')
else:
print('sorry login fail!!')
Entre your login:evil
Entre your password:22
Welcome to Python!!

9)三元运算(是针对if else来说)

我们常用的:

 if 1==1:
a=2
print(a)
else:
a=3
print(a)
2

用三元运算可以这么写:

 a=2 if 1==1 else 3
print(a)
2

lamdba表达式:

 sum=lambda x,y:x+y
print(sum(1,2))
3

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAACRCAIAAACkBZDCAAAcHklEQVR4nO2dfXAb5Z3HdzrDdO6fttdebzqEXnq96Vzv6HGFtMXiSnslbidzFHAhhbwYDkJQrCPhZYhNoIAdByjgWAk0DXHUAjVJbIJTktjIaV6dpHkjUl78oiAlTv0W2/G7JEuy9vX+2NXLrnZXK+t1pe9nfuORVrv77CrRfvb3ex49IjgAAABAhxDZPgAAAABgNkBgAAAAdAkEBkDqIeTI9kEBkG/gQwVA6onVFQQGQMqRvVMEACQLPmkApJ2saBOAfEXpk4XPGgCpAgIrdCY9lKvHf+K8e/eh8YZPR3YfGj9x3u3q8U95qGwfWj4AgQGQAfChKhSuXQ9u2Tm0Yu2V+5/+/M5HOn7+RNeSCtczb1x9ra5/R8vIa3X9z7xxdUmF6+fLu+58pOP+pz8vW3ulbufw4Egw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AsDsgMAAAFJiNaOeY2nMwLSndABoAQIDAEiR5FKSB9FPY22kJCeVBA6A2QGBAQCkyBor1mfhp0qqk+xQi9IA0A4EBgCQom6a2IJhrMPUh3ugeAhSAgQGAJCiMQNTWU1FYFAXSBUQGABAisY+MMmrKutwyuPy4TMwayAwAIAUjSVEWQ/FCix6fEfctgDQDgQGAJAiqx+lV1UWquw27soAxAUCAwBISejLyBLDqSdbKCGCFAKBAQCkqPRXSaqF6pXD2N3KtpWWcwAFAAQGAABAl0BgAAAAdAkEBgAAQJdAYAAAAHQJBAYAAECXQGAAAAB0CQQGAABAl0BgAAAAdAkEBgAAQJdAYAAAAHQJBAYAAECXQGAAAAB0CQQGAABAl0BgAAAAdAkEBgAAQJdAYAAAAHQJBAYAAECXQGAAAAB0CQQGAABAl0BgAAAAdAkEBgAAQJdAYAAAAHQJBAZAKiHkyPZBAZBXhD9Z/w/Qw5izovD7bAAAAABJRU5ErkJggg==" alt="" />

之前的写法:

 def sum(x,y):
return x+y
print(sum(1,2)) 3

lamdba 是适用于简单的运算和判断,不适用于复杂的判断逻辑。

10)常用函数:

1:all()当所有元素为真才为真。

2:any()至少其中一个元素为真才为真。

 m=all([1,2,3,4,])
print(m)
n=any([None,False])
print(n) True
False
 m=all([1,2,3,0,])
print(m)
n=any([None,True])
print(n)
False
True

3:abs() 求绝对值:

 print(abs(-))
 

3:bool() 求布尔值。

 print(bool())
True

4:bytes()字符串转换字节。需要指定转换编码比如:utf-8 ,gbk.

 a='evil'
print(bytes(a,encoding='utf-8'))
b='汉武帝'
print(bytes(b,encoding='utf-8'))
b'evil'
b'\xe6\xb1\x89\xe6\xad\xa6\xe5\xb8\x9d'

那字节怎么转换成字符串呢?同样用str()函数。但是必须指定相应的编码才可以哦。不正确的编码会报错哦。

 print(str(b'\xe6\xb1\x89\xe6\xad\xa6\xe5\xb8\x9d',encoding='utf8'))

 汉武帝

11)文件操作:

 操作文件时候需要2个步骤:1)打开文件。2)操作文件。
1:打开文件模式有:
 f=open('haproxy','r',encoding='utf-8')##以只读模式,以utf-8编码打开文件
f1=open('haproxy','w',encoding='utf-8')##以写模式,以utf-8编码打开文件,如果文件存在则直接清空,如果没有则创建。
f2=open('haproxy','x',encoding='utf-8')##在python3中新加的,文件存在报错,不存在则创建并写入内容。
f3=open('haproxy','a',encoding='utf-8')###文件追加内容。
r+,w+,a+表示既可读也可以写。
'b'模式以二进制形式打开文件。rb,wb,ab.
如果平时open打开文件是乱码,一般是编码有问题。现在一般使用编码utf-8编码。
注意:在使用open()函数打开文件的时候,在文件操作完毕的时候需要把文件句柄关闭即:
 f=open('xxx','mod',encoding='xx')
xxxxx
f.close()

 由于这么操作的时候容易忘记关闭文件句柄。用with   as  函数来管理上下文件。文件操作完毕自动关闭文件。
 with open('haproxy.txt','r',encoding='utf-8') as file_obj:
pass

在python2.7以后with函数可以同时操作多个文件。最常用的操作就是:一个文件在读,一个文件在写。
 with open(1.txt','r',encoding='utf-8') as file_obj,open('1.back','w',encoding='utf-8')as file_obj1:
for i in file_obj.readlines():
i.replace('evil','tom')
file_obj1.write(i)
2:操作文件:
文件在硬盘以2进制存储,默认情况当python在以(r+,w+,a+等模式)读的时候,在不指定编码的时候,以pytho解释器默认编码,编码成字符串,供程序员进行读写。
如果以rb,wb,ab方式是不用python默认编码,直接以字节方式进行访问,存储的方式2进制,所以要把字符串写入文件,需要把字符串转化成字节才能写入。
1)常用的操作文件的函数。
file.fulsh(),强制把内存的内容刷进硬盘。
实验:
用input()交互方式,在等待用输入的时候,看文件是否内容。
 with open('test.txt','a') as f1:
f1.write('this is test!')
dengdai=input('entre your NUM:')
运行该程序,查看文件。文件缓存区的内容没有写入磁盘内,加上file.fulsh(),我们在看下。

 with open('test.txt','a') as f1:
f1.write('this is test!')
f1.flush()
dengdai=input('entre your NUM:')

发现文件句柄没释放,已经把文件内容写入文件里。
2) file.read()在指定字节大小,可以读指定字节,在没指定,读取文件整个内容。
 with open('test.txt','r') as f1:
for i in f1.read():
print(i) t

文件内容:
1111this is test!
3)file.readline()仅读取文件一个行。
 with open('test.txt','r') as f1:
for i in f1.readline():
print(i)

4)file.readlines()读取文件,一行为单位,并根据换行来保存值列表,这个函数很常用。
 with open('test.txt','r') as f1:
for i in f1.readlines():
print(i) 1111this is test!
5)file.seek()指定文件指定到指定位置(字节)。
 with open('test.txt','r') as f1:
f1.seek()
for i in f1.readlines():
print(i) this is test!
文件内容:1111this is test!
将文件指针移到第四个字节。然后操作读。
6)file.tell()获取文件当前指针。
 with open('test.txt','r') as f1:
f1.seek()
for i in f1.readlines():
print(i)
print(f1.tell()) this is test!

因为文件读完,文件指针在文件的末尾。
7)file.truncate (),根据文件指针位置,在文件指针位置以后被清空。
 with open('test.txt','r+') as f1:
f1.seek()
f1.truncate()

上述文件内容,指定文件指针位置,文件指针位置以后都清除。
8)file.write()写数据,有b按字节写入,没指定按字符串写入。
 with open('test.txt','r+') as f1:
f1.seek()
f1.write('goodbye!')
1111goodbye!

9)需要注意,在读文件的时候,最好用如下方式进行读,这种方式是生成迭代器,效率较高。相比read(),readline(),readlines()
 with open('test.txt','r',encoding='utf-8') as f1:
for i in f1:
print(i)


day3-Python集合、函数、文件操作,python包的概念的更多相关文章

  1. NO.3:自学python之路------集合、文件操作、函数

    引言 本来计划每周完成一篇Python的自学博客,由于上一篇到这一篇遇到了过年.开学等杂事,导致托更到现在.现在又是一个新的学期,春天也越来越近了(冷到感冒).好了,闲话就说这么多.开始本周的自学Py ...

  2. Python小白的发展之路之Python基础(二)【字符串、列表、集合、文件操作】

    列表.元组操作 字符串操作 字典操作 集合操作 文件操作 字符编码与转码 1.列表.元组操作 (1)列表 列表是可变的(mutable)——可以改变列表的内容,这不同于字符串和元组,字符串和元组都是不 ...

  3. Python open()函数文件打开、读、写操作详解

    一.Python open()函数文件打开操作 打开文件会用到open函数,标准的python打开文件语法如下:open(name[,mode[,buffering]])open函数的文件名是必须的, ...

  4. python 历险记(三)— python 的常用文件操作

    目录 前言 文件 什么是文件? 如何在 python 中打开文件? python 文件对象有哪些属性? 如何读文件? read() readline() 如何写文件? 如何操作文件和目录? 强大的 o ...

  5. python os&shutil 文件操作

    python os&shutil 文件操作 # os 模块 os.sep 可以取代操作系统特定的路径分隔符.windows下为 '\\' os.name 字符串指示你正在使用的平台.比如对于W ...

  6. Python集合类型的操作与应用

    Python集合类型的操作与应用 一.Python集合类型 Python中的集合类型是一个包含0个或多个数据项的无序的.不重复的数据组合,其中,元素类型只能是固定数据类型,如整数.浮点数.字符串.元组 ...

  7. Python的高级文件操作(shutil模块)

    Python的高级文件操作(shutil模块) 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 如果让我们用python的文件处理来进行文件拷贝,想必很多小伙伴的思路是:使用打开2个 ...

  8. Python入门篇-文件操作

    Python入门篇-文件操作 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.文件IO常用操作 open:打开 read:读取 write:写入 close:关闭 readlin ...

  9. python基础篇(文件操作)

    Python基础篇(文件操作) 一.初始文件操作 使用python来读写文件是非常简单的操作. 我们使用open()函数来打开一个文件, 获取到文件句柄. 然后通过文件句柄就可以进行各种各样的操作了. ...

  10. python学习总结---文件操作

    # 文件操作 ### 目录管理(os) - 示例 ```python # 执行系统命令 # 清屏 # os.system('cls') # 调出计算器 # os.system('calc') # 查看 ...

随机推荐

  1. 452. Minimum Number of Arrows to Burst Balloons——排序+贪心算法

    There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided ...

  2. eval()函数使用

    条件:有数据集data[indx],数据集内含有对象data[index].obj1.pama1. 说明:传入参数为var str = 'obj1.pama1',要求取得data[index].obj ...

  3. CentOS 6.2下SVN服务器的安装与配置

    安装了一下SVN服务器,本文没有与Apache整合,过程如下: 一,下载相关软件: [root@youxia201 test]# wget http://subversion.tigris.org/d ...

  4. 在完成一个异步任务后取消剩余任务(C#)

    完整实例 using System;using System.Collections.Generic;using System.Linq;using System.Text;using System. ...

  5. ios下input focus弹出软键盘造成fixed元素位置移位

    正常状态下 input focus软键盘弹出时 问题描述: 头部结构fixed,滚动到下部内容区域,input.textarea等focus弹出软键盘时,头部位置偏移被居中(该问题ios7 beta3 ...

  6. 转: CSS中overflow的用法

    Overflow可以实现隐藏超出对象内容,同时也有显示与隐藏滚动条的作用,overflow属性有四个值:visible (默认), hidden, scroll, 和auto.同样有两个overflo ...

  7. ZOJ 3647 Gao the Grid dp,思路,格中取同一行的三点,经典 难度:3

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4837 三角形的总数=格子中任取3个点的组合数-同一横行任取3个点数目-同一纵行 ...

  8. City Skyline

    题目大意:(poj 3044) 给出城市的正视图,所有的大楼都是矩形,给出正视图每个高度改变时的坐标,问最少有多少大楼.一共N个矩形,N<=50000 解题过程: 首先可以把问题转化一下:有N块 ...

  9. 从报错“无效操作,连接被关闭”探究Transaction的Timeout超时机制

    1.报错如下:Invalid Operation the connection is closed,无效操作,连接被关闭.这个错误是并不是每次都报,只有在复杂操作.大事务的情况下才偶然报出来. sta ...

  10. android 判断网络是否连接

    package com.liucanwen.baidulocation.util; import android.app.Activity; import android.content.Contex ...