python零基础入门必知必会[python note 01]
2020-03-26 本文已影响0人
墨流引
直到python的最新官方消息在哪找
- python官网: https://www.python.org/
- python官方下载地址: https://www.python.org/downloads/
- python官方文档中文版:https://docs.python.org/zh-cn/3/tutorial/index.html
python保留字
import keyword
print(keyword.kwlist)
['False', 'None', 'True', 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']
python pip安装与换源
- pip源
阿里云 https://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
- 临时使用
pip install django -i https://pypi.tuna.tsinghua.edu.cn/simple
- 永久修改:
linux:
修改~/.pip/pip.conf
(没有就创建一个), 内容如下:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
- 清华 pip help https://mirrors.tuna.tsinghua.edu.cn/help/pypi/