Reference
https://www.freesion.com/article/24021467976/
https://blog.csdn.net/weixin_41978699/article/details/121091448
https://www.wordpressleaf.com/2017_1955.html
Author: Beck
Nginx服务添加至Systemctl
cat << EOF > /usr/lib/systemd/system/nginx.service
[Unit]
Description=nginx
After=network.target
[Service]
Type=forking
PIDFile=/usr/local/nginx/logs/nginx.pid
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/usr/local/nginx/sbin/nginx -s reload
ExecStop=/usr/local/nginx/sbin/nginx -s stop
PrivateTmp=true
[Install]
WantedBy=multi-user.target
EOF
Python emumerate结合for循环巧用
Code
subjects_list = ["Chinese", "Math", "English"]
scores_list = [92, 75, 99]
for index,value in enumerate(subjects_list):
print value, scores_list[index]
Output
Chinese 92
Math 75
English 99