字符串(string) 1.字符串的表现形式为:变量名=“ string ”或变量名=‘ string ’或 变量名=""" string """,比如: str1 = 'hello, world!' str2 = "hello, world!" str3 = "子曰:'学而时习之,不亦说乎'" s ...
分类:
编程语言 时间:
2019-11-22 00:50:09
阅读次数:
59
先看一下脚本 直接通过sendmail命令和脚本执行是没有问题,通过zabbix web界面测试就不行 查看了sendmail的日志报错是这样的, 这里google里好多, 修改了dns,改了hosts解析 都不行, 最后我把脚本里的smtp.qq.com改为用dig解析的ip,在测试就没有问题了, ...
分类:
其他好文 时间:
2019-11-19 15:31:33
阅读次数:
61
介绍Python中的几种常用模块 1.time模块 与时间处理有关的python内置模块 时间戳:自1970-01-01 00.00:00到当前时间,按秒计算,到现在为止一共多少秒 import time # 导入时间模块包import timeprint(time.time()) # 获取当前时间 ...
分类:
编程语言 时间:
2019-11-17 23:42:16
阅读次数:
110
Python格式化输出 1、%d是输出整数 ,%f小数,浮点数,%s 是字符2、要想用print语句连接字符串, 可以使用,end='' 的办法,其中在''里可以添加其它字符串")3、isdigit()方法的意思是判断salary变量长的像不像数字 "1234500" python print格式化 ...
分类:
其他好文 时间:
2019-11-17 17:24:51
阅读次数:
93
题目描述 Description Graph constructive problems are back! This time the graph you are asked to build should match the following properties. The graph is ...
分类:
其他好文 时间:
2019-11-17 15:09:00
阅读次数:
55
time模块 文件命名规范:不可以以模块名直接对文件命名 例如:time.py 在python中的三种表现形式: 1.时间戳:给电脑看的 2.格式化时间(Format String)给人看到 返回的是时间的字符串 2002 01 11 3. 格式化时间对象(struct_time) ? 返回的是一个 ...
分类:
其他好文 时间:
2019-11-16 19:24:29
阅读次数:
70
#第一章 快速上手:基础知识# 1.1交互式解释器# 1.2 算法是什么# 1.3 数和表达式 + - * /(求商) %(求余)# 十六进制、 八进制 二进制# print(0xAF) # 16进制 0x 开头# print(hex(175)) # 10进制转化为 16 进制# print(0o1 ...
分类:
编程语言 时间:
2019-11-12 19:48:17
阅读次数:
89
字符串 name = 'ab c dd' i = name.find('a', 1, 3) # 找到返回对应下标 找不到返回-1 print(i) j = name.rfind('d') # 寻找对应的下标从右边找 k = name.find('d') # 寻找对应的下标从左边找 print(j, ...
分类:
其他好文 时间:
2019-11-12 12:56:18
阅读次数:
118
~~Luogu智能推荐给我搞的这个题啊,亦可赛艇!~~ "题目链接" Solution [湖南集训]谈笑风生 题目大意:~~和Wallace谈笑风生~~,给定一棵有根树,多次询问给定点$p$和限制$k$,求有多少对有序三元组$(p,b,c)$满足$p,b$均为$c$的祖先且$p,b$间距离不超过$k ...
分类:
其他好文 时间:
2019-11-12 11:14:16
阅读次数:
68
文本处理 awk sed grep sort uniq cat cut echo fmt tr nl egrep fgrep wc 进程监视 ps top htop atop lsof 网络 nmap tcpdump ping mtr tracerote airmon airodump dig ip ...
分类:
系统相关 时间:
2019-11-11 12:42:20
阅读次数:
98