python学习笔记之五

1、Python HTTP server

win环境需要加cgi参数
python -m http.server --cgi 8000
其他如下:
python -m http.server 8080
2、指定位数不足补零
zfill方法:
n = "123"
s = n.zfill(5)
assert s == "00123"
字符串格式化方法:
n = 123
s = "%05d" % n
assert s == "00123"
 
3、python与c++混合编程
pybind11
原文地址:https://www.cnblogs.com/joxin/p/9887207.html