09 2017 档案

摘要:a =[ [col for col in range(4)] for row in range(4)]for i in a : print(i)print(' ')for h,zhi in enumerate(a): for l in range(h,len(zhi)): tem = a[l][h] 阅读全文
posted @ 2017-09-04 19:41 王盼0810 阅读(132) 评论(0) 推荐(0)
摘要:2分查找 阅读全文
posted @ 2017-09-03 10:45 王盼0810 阅读(158) 评论(0) 推荐(0)
摘要:简单的装饰器: def login(func): def inner(arg): print('对%s进行审查...'%arg) func(arg) return inner@logindef tv(name): print('欢迎%s'%name)# tv = login(tv)tv('alex' 阅读全文
posted @ 2017-09-03 10:44 王盼0810 阅读(97) 评论(0) 推荐(0)
摘要:def main(d1,d2,stop): if d1==0: print(d1,d2) d3 = d1 +d2 print(d3) if d3<stop: main(d2,d3,stop)main(0,1,30) 阅读全文
posted @ 2017-09-03 10:12 王盼0810 阅读(217) 评论(0) 推荐(0)
摘要:1、set集合 set集合是一种无序且不重复的集合 添加功能: 默认参数必须写在后面。 Python的编码注释# -*- coding:utf-8 -*- 如果要在python2的py文件里面写中文,则必须要添加一行声明文件编码的注释,否则python2会默认使用ASCII编码。 参考:http:/ 阅读全文
posted @ 2017-09-02 22:19 王盼0810 阅读(135) 评论(0) 推荐(0)
摘要:clc;clear all; maindir = 'C:\Users\wang\Desktop\iLIDS-VID\i-LIDS-VID\images\cam2';subdir = dir( maindir ); % 先确定子文件夹 for i = 1 : length( subdir ) if( 阅读全文
posted @ 2017-09-02 22:18 王盼0810 阅读(970) 评论(0) 推荐(0)