摘要: #!/usr/bin/env python #dawf a cirle and print the x,y import math center = [10.0,10.0] #center point rad = 10 sep = 2*math.pi/360 #sep use 1 angle point = [] for angle in range(181): ... 阅读全文
posted @ 2017-09-17 17:01 学习时光 阅读(2108) 评论(0) 推荐(0) 编辑
摘要: 转自http://blog.csdn.net/seetheworld518/article/details/46959871 Python中map()、filter()、reduce()这三个都是应用于序列的内置函数。 格式: map(func, seq1[, seq2,…]) 第一个参数接受一个函 阅读全文
posted @ 2017-09-17 15:28 学习时光 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 可以直接作用于for循环的数据类型有以下几种: 一类是集合数据类型,如list、tuple、dict、set、str等; 一类是generator,包括生成器和带yield的generator function。 这些可以直接作用于for循环的对象统称为可迭代对象:Iterable。 而生成器不但可 阅读全文
posted @ 2017-09-17 11:19 学习时光 阅读(201) 评论(0) 推荐(0) 编辑