上一页 1 ··· 161 162 163 164 165 166 167 168 169 ··· 178 下一页
  2018年12月13日
摘要: a=[str(i) for i in range(88888,88912)] b=[str(i) for i in range(77777,77785)] def f(a,b,k=0,m=0): n=0 g = [] while n<4: j = 0 for i in a[k:]: while j < 1:... 阅读全文
posted @ 2018-12-13 16:43 一杯明月 阅读(3302) 评论(0) 推荐(0)
摘要: 运行结果: 阅读全文
posted @ 2018-12-13 15:28 一杯明月 阅读(1201) 评论(0) 推荐(0)
  2018年12月10日
摘要: 运行结果: ['2', '5', '6', '11', '2', '535', '2', '2'][0, 4, 6, 7] 枚举: (0, 'a')(1, 'b')(2, 'c') 运行结果: 0 a1 b2 c 阅读全文
posted @ 2018-12-10 19:55 一杯明月 阅读(969) 评论(0) 推荐(0)
  2018年12月9日
摘要: DR 阅读全文
posted @ 2018-12-09 15:43 一杯明月 阅读(2659) 评论(0) 推荐(0)
  2018年12月7日
摘要: from itertools import islice with open(“1.txt") as f: for a in islice(f,0,2): print(a) 阅读全文
posted @ 2018-12-07 16:57 一杯明月 阅读(2132) 评论(0) 推荐(0)
摘要: 运行结果: Hello, Autocad from PythonDrawing2.dwg 上面这个例子不可以运行,因为没有初始化点的坐标。 运行结果: C:\Users\Qin\AppData\Local\Programs\Python\Python36\python.exe D:/statisti 阅读全文
posted @ 2018-12-07 10:09 一杯明月 阅读(10288) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2018-12-07 09:41 一杯明月 阅读(1460) 评论(0) 推荐(0)
  2018年12月6日
摘要: import os def new_txt(): a1='实线' b = os.getcwd() + '\\fazhandadao_test_txt\\' if not os.path.exists(b): os.makedirs(b) for file in range(1000,1020): open(b+a1+str(fi... 阅读全文
posted @ 2018-12-06 19:31 一杯明月 阅读(10889) 评论(0) 推荐(0)
  2018年12月5日
摘要: 通过函数指针调用函数: 把一个函数赋值给函数指针: 链接:https ://zhuanlan.zhihu.com/p/37306637 阅读全文
posted @ 2018-12-05 16:32 一杯明月 阅读(153) 评论(0) 推荐(0)
  2018年12月4日
摘要: 1.定义:同一类型的元素的集合。 2.生成:用[]创建,元素之间用逗号或者空格隔开。 第一例: >>a=[1,2,3,4] a = 1 2 3 4 注意,取矩阵的某几列,是这样a(:,2:3),即a后面是小括号,不是中括号。 第二例: >> b=1:5 b = 1 2 3 4 5 第三例,生成0矩阵 阅读全文
posted @ 2018-12-04 14:41 一杯明月 阅读(2119) 评论(0) 推荐(0)
上一页 1 ··· 161 162 163 164 165 166 167 168 169 ··· 178 下一页