Python 安装依赖包时指定国内镜像源
以Django为例 安装时指定 执行命令 python -m pip install Django -i https://pypi.tuna.tsinghua.edu.cn/simple/ 永久生效
以Django为例 安装时指定 执行命令 python -m pip install Django -i https://pypi.tuna.tsinghua.edu.cn/simple/ 永久生效
输出
输入
Python中的字典可以理解为Java中的map或者json 生成新的字典
ujson库 json数据序列化和反序列化 安装 pip install ujson 更新ujson三方库 pip install -U ujson 删除ujson三方库 pip uninstall -y ujson URL网络请求 requests库,简单且强大 pip install reque
字符串前面带有f作用 例如:f"Hello, {name}!" 其含义是使用 f - 字符串将变量值嵌入到字符串中,通熟易懂就是将字符串和变量拼接起来,如下 在上述代码中,f"Hello, {name}!" 是一个 f - 字符串,{name} 是一个表达式,Python 会计算 name 的值(也