11 2017 档案
生成器yield
摘要:#!/usr/bin/python#coding=utf-8'''Created on 2017年11月23日 from home @author: James zhan ''' def counter(start_at=0): count=start_at while True: val=(yie
阅读全文
递归函数
摘要:#!/usr/bin/python#coding=utf-8'''Created on 2017年11月2日 from homeN!=fun(n)=1*2*3 ... * n@author: James zhan ''' def fun(n): if n==0 or n==1: return 1 e
阅读全文
Python第一个GUI
摘要:#!/usr/bin/python#coding=utf-8'''Created on 2017年11月2日 from home @author: James zhan ''' from functools import partialimport Tkinter root=Tkinter.Tk()
阅读全文
内建函数之:reduce()使用
摘要:#!/usr/bin/python#coding=utf-8'''Created on 2017年11月2日 from home @author: James zhan ''' print reduce(lambda x,y:x+y,range(5)) '''reduce函数运行操作步骤((((0+
阅读全文
浙公网安备 33010602011771号