- python模块内需要有_init_.py 才会被扫描成python包进而可以调用,因python版本不同,这一特性时有时无
- 挂代理pip install XXX -i https://pypi.tuna.tsinghua.edu.cn/simple
- python注释中出现中文可能出现无法通过解释器,需要在首行申明 # coding:utf-8,或者IDE上作全局解释
- Python 3.6以上版本的新增特性,可以用下划线来分割数字以提高可读性,例如:
dec_base = 1_000_000
bin_base = 0b_1111_0000
hex_base = 0x_1234_abcd
———————————————————————
———————20210119——————————— - _thread.start_new_thread(fun(),argus[],kwargs[]):简单的创建新线程。
demo:
for i in range(1, task_num):
t