10 2017 档案
摘要:1. 采用linux系统自带的logrotate 1. logrotate的配置文件: /etc/logrotate.conf 配置文件里面的参数,按照自己的需求进行修改,我这里使用默认值 weekly # keep 4 weeks worth of backlogs rotate 4 # crea
阅读全文
摘要:1. 三元表达式 name=input('姓名>>: ') res='SB' if name == 'alex' else 'NB' print(res) 一. 递归 递归函数: def a (): print ("from b") b() def b(): print("from a ") a()
阅读全文
摘要:1. 迭代器 1. 什么是迭代 迭代是一个重复的过程,每次重复即一次迭代,并且每次迭代的结果都是下一次迭代的初始值 while True: #只是单纯地重复,因而不是迭代 print(' >') l=[1,2,3] count=0 while count < len(l): #迭代 print(l[
阅读全文

浙公网安备 33010602011771号