1 def add(a, b): 2 print(f"ADDING {a} + {b}") 3 return (a + b) 4 5 6 def subtract(a, b): #subtract :减去的意思 7 print(f"SUBTRACT {a} - {b}") 8 return a - ...
分类:
编程语言 时间:
2020-07-18 15:32:09
阅读次数:
76
1 #命名、变量、代码、函数 2 #this one is like your scripts with argv 3 def print_two(*args): 4 arg1, arg2 = args #将参数解包 5 print(f"arg1: {arg1}, arg2: {arg2}") 6 ...
分类:
编程语言 时间:
2020-07-18 13:33:56
阅读次数:
109
ex15.py 完成ex15.py需要在ex15.py同文件夹目录下面准备一个txt文件(ex15_sample.txt) 执行ex15.py 如: python ex15.py ex15_sample.txt。则可以读取 ex15_sample.txt这个文件的内容 读取文件的基本操作: 打开一个 ...
分类:
编程语言 时间:
2020-07-18 11:22:18
阅读次数:
71
定义函数的语法: def 函数名(参数) (语句) 1 #函数和变量 2 #函数里的变量与脚本里的变量是没有联系的。 3 def cheese_and_crackers(cheese_count,boxes_of_crackers): 4 print(f"You have {cheese_count ...
分类:
编程语言 时间:
2020-07-18 11:20:21
阅读次数:
87
#情景:向服务器上传文件,发送文件,获取目录,和退出 服务器端: """ /etc/python3 @File : miker_server.py @Time : 2020/7/15 下午3:29 @Author : wangyongqi @Email : 92644827@qq.com @SOft ...
分类:
其他好文 时间:
2020-07-17 22:26:01
阅读次数:
83
服务端: """ /etc/python3 @File : poll_test.py @Time : 2020/7/17 下午5:00 @Author : wangyongqi @Email : 92644827@qq.com @SOftware : PyCharm """ from socket ...
分类:
其他好文 时间:
2020-07-17 22:21:19
阅读次数:
90
阅读代码的时候会看到下面语句: from __future__ import print_function 查阅了一些资料,这里mark一下常见的用法! 首先我们需要明白该句语句是python2的概念,那么python3对于python2就是future了,也就是说,在python2的环境下,超前使 ...
分类:
编程语言 时间:
2020-07-17 22:08:38
阅读次数:
70
zabbix的网络监控能力特别捉急 公司领导要求又高开发了这个玩意 ''' import datetime import json import sys import os import re import subprocess class tools(object): def init(self) ...
分类:
其他好文 时间:
2020-07-17 19:49:38
阅读次数:
121
/* Name: Copyright: Author: Mudrobot Date: <DATETIME> Description: */ #include<bits/stdc++.h> #define gc() getchar()//caution!!! #define LL long long ...
分类:
其他好文 时间:
2020-07-17 14:04:00
阅读次数:
107
一、测试数据 API_TestCase.xlsx F1:get请求测试数据 F2:POST请求测试数据 F3:PUT请求测试数据 F4:DELETE请求测试数据 二、测试数据读取方法 readExcel.py # _*_ coding:utf-8 _*_ from Common import get ...
分类:
编程语言 时间:
2020-07-16 21:18:34
阅读次数:
62