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]
阅读全文
摘要:简单的装饰器: def login(func): def inner(arg): print('对%s进行审查...'%arg) func(arg) return inner@logindef tv(name): print('欢迎%s'%name)# tv = login(tv)tv('alex'
阅读全文
摘要: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)
阅读全文
摘要:1、set集合 set集合是一种无序且不重复的集合 添加功能: 默认参数必须写在后面。 Python的编码注释# -*- coding:utf-8 -*- 如果要在python2的py文件里面写中文,则必须要添加一行声明文件编码的注释,否则python2会默认使用ASCII编码。 参考:http:/
阅读全文
摘要:clc;clear all; maindir = 'C:\Users\wang\Desktop\iLIDS-VID\i-LIDS-VID\images\cam2';subdir = dir( maindir ); % 先确定子文件夹 for i = 1 : length( subdir ) if(
阅读全文
浙公网安备 33010602011771号