摘要:
python decorator is a crucial(vital,signifiant) process. decorator mail two category 1:principal function no arguments(parameters): for example: princ 阅读全文
posted @ 2020-03-15 21:34
alansuny
阅读(104)
评论(0)
推荐(0)
摘要:
from functools import reduce import time def factorial_array(n) number=reduce(lambda x,y:x*y,range(1,n+1)) return number print( factorial_array(101) d 阅读全文
posted @ 2020-03-15 19:56
alansuny
阅读(119)
评论(0)
推荐(0)
摘要:
instances: def func(): x=10 def inner(): print(x) return inner a=func() a() result of execute is 10 print(a()) result of execute is none :because the 阅读全文
posted @ 2020-03-15 14:05
alansuny
阅读(158)
评论(0)
推荐(0)
摘要:
function domain: L ocal E nclosing Global Built-in instance: def outer(): x=10 def inner(): print(x) return inner call inner method 1:print (outer()() 阅读全文
posted @ 2020-03-15 12:48
alansuny
阅读(134)
评论(0)
推荐(0)
摘要:
built-in function,is python already prepar for us ,anytime we can call built-in function when we needed it . all() dict() help() all([1,2,'') eval('1+ 阅读全文
posted @ 2020-03-15 11:13
alansuny
阅读(145)
评论(0)
推荐(0)
摘要:
fibo digit array: 1 2 3 4 5 6 7 8 9 10 11 0 1 1 2 3 5 8 13 21 34 55 we can find out the rule(law ,regularity,disciplinarian). the number equity before 阅读全文
posted @ 2020-03-15 09:31
alansuny
阅读(117)
评论(0)
推荐(0)
摘要:
starting with a factorial : def function_factorial(n): number=1 for i in range(1,n+1): number *=i return number print(function_factorial( n) use this 阅读全文
posted @ 2020-03-15 07:31
alansuny
阅读(100)
评论(0)
推荐(0)
浙公网安备 33010602011771号