十. Python基础(10)--装饰器 1 ● 装饰器 A decorator is a function that take a function as an argument and return a function. We can use a decorator to extend the functionality of an existing function without changing its source. Decorators are syntactic sugar.…
一 安装,导入模块 安装: pip3 install 模块名称 导入: import module from module.xx.xx import xx from module.xx.xx import xx as rename from module.xx.xx import * 二 random random.random random.random()用于生成一个0到1的随机符点数: 0 <= n < 1.0 random.randint 用于生成一个指定范围内的整数 random.r…