摘要:
python decorator is a crucial(vital,signifiant) process. decorator mail two category 1:principal function no arguments(parameters): for example: princ 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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()() 阅读全文
摘要:
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+ 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文