Python Summary
import ... 后面只能是模块或包 from ... import ... 中,from 后面只能是模块或包,import 后面可以是任何变量
import requests # pass
from requests import Session # pass
import requests.Session # error
以下不管更改哪个变量,另外一个也在同时做更改
info = {'name': 'LQ', 'age': 30}
info2 = info
names = ['LQ', 'qiong.lin']
names2 = names
names2 = names[:]
info2 = info.copy
#如果条件为真,返回真 否则返回假
condition_is_true if condition else condition_is_false
result = 'test' if True else 'not test' # result = 'test'
result = 'test' if False else 'not test' # result = 'not test'