随笔分类 - python3
摘要:官网:https://fastapi.tiangolo.com/zh/#_2 源码:https://github.com/fastapi/fastapi 指定版本安装: 入门案例: from fastapi import FastAPI app = FastAPI() @app.get('/hell
阅读全文
摘要:https://pypi.tuna.tsinghua.edu.cn/simple
阅读全文
摘要:def check(fn): def inner(x,y): print('验证登录',x,y) fn(x,y) return inner @check def comment(x,y): print("发表评论",x,y) if __name__ == '__main__': comment(10
阅读全文
摘要:import os class Student: stu_list = [] def __init__(self, name, age, phone): self.name = name self.age = age self.phone = phone def __str__(self): ret
阅读全文
摘要:def welcome(n): if n>1: welcome(n-1) print(f"你好啊{n}") welcome(5) n=5时,判断n>1,进入递归,第4行代码进入待执行栈结构中 .... n=2时,判断n>1,条件成立,第4行代码进入待执行栈结构中("你好啊2") n=1时,判断n>1
阅读全文
摘要:python中的内置函数: https://docs.python.org/zh-cn/3.13/library/functions.html python中的模块: https://docs.python.org/zh-cn/3.13/py-modindex.html
阅读全文
摘要:name = "zhang" age = 20 weight = 55.5 result = "我是%s,今年%i岁,体重:%s" % (name, age, weight) # 推荐使用下面的方法 info = f"我是{name},今年{age}岁,体重:{weight}" print(resu
阅读全文

浙公网安备 33010602011771号