随笔分类 - python
python学习过程
摘要:def hanoi(n, a, b, c): """ 汉诺塔问题: 1.将n-1个盘子从a移动到c 2.将a剩下的一个盘子从a移动到c 3,将n-1个盘子从b经过a移动到c """ if n > 0: hanoi(n - 1, a, c, b) print("moving from %s to %s
阅读全文
摘要:首先执行下面一条命令 生成 jupyter notebook的配置文件 jupyter notebook --generate-config 进入路径修改配置 绑定ip 修改 ## The IP address the notebook server will listen on. # Defaul
阅读全文
摘要:定义装饰器函数 1 def run_forever(func): 2 def wrapper(obj): 3 while True: 4 func(obj) 5 return wrapper 类初始化 def __init__(self, page): self.max_page = page se
阅读全文
浙公网安备 33010602011771号