随笔分类 -  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 阅读全文
posted @ 2021-01-17 11:27 traurig 阅读(79) 评论(0) 推荐(0)
摘要:首先执行下面一条命令 生成 jupyter notebook的配置文件 jupyter notebook --generate-config 进入路径修改配置 绑定ip 修改 ## The IP address the notebook server will listen on. # Defaul 阅读全文
posted @ 2020-12-12 22:23 traurig 阅读(1101) 评论(0) 推荐(0)
摘要:定义装饰器函数 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 阅读全文
posted @ 2020-06-29 21:28 traurig 阅读(203) 评论(0) 推荐(0)