遍历dict 暂停一秒输出

admin5年前 (2016-04-30)1579
 #!/usr/bin/python# -*- coding: UTF-8 -*-import timemyD = {1: 'a', 2: 'b'}for k...

python输出9*9乘法口诀表

admin5年前 (2016-04-27)2545
 #!/usr/bin/python# -*- coding: UTF-8 -*-for i in range(1,10):    for j in range...

python list赋值

admin5年前 (2016-04-25)940
 #!/usr/bin/python# -*- coding: UTF-8 -*-a = [1, 2, 3]b = a[:]c=aa=1print (b,c,a)""&q...

python斐波那契数列

admin5年前 (2016-04-22)1109
 #!/usr/bin/python# -*- coding: UTF-8 -*-def fib(n): a,b = 1,1 for i in range(n-1):&n...

python排序list的sort方法

admin5年前 (2016-04-15)828
 #!/usr/bin/python# -*- coding: UTF-8 -*-l = []for i in range(3):    x = int(inp...

python日期计算

admin5年前 (2016-04-11)855
 #!/usr/bin/python# -*- coding: UTF-8 -*-year = int(input('year:\n'))month = int(input(...

python科学计算

admin5年前 (2016-04-05)725
 import mathfor i in range(10000):    #转化为整型值    x = int(math.sqr...

python提成计算例子

admin5年前 (2016-04-01)806
 #!/usr/bin/python# -*- coding: UTF-8 -*-i = int(input('净利润:'))arr = [1000000,600000,40...