一.学习知识总结 (1)迭代 range(起始值,结束值,步长):包含起始值,不包含结束值,步长为正数 (2)导入模块 from datetime import datetime (3)查看帮助 dir(random) help(random.randint) (4)4个内置的数据结构:列表.字典.元组和集合 列表: if letter not in found: nums=[1,2,3,4] nums.remove(3) nums.pop() #如果没有指定弹出哪个索引…
首先声明,这里用到的库是在coursera上学习时,老师建立的一个库 #timer import simplegui import random # global state message = "Python is Fun!" position = [50, 50] width = 500 height = 500 interval = 2000 #Handler for text box def update(text): global message message = text…
__author__ = 'student' print 'hello world hello python' ''' heap sort root leftchild 2n+1 rightchild 2n+2 compare them and get the maxnode step by step think way one step write the perfect program is hard but it is easy to write your think step by st…