数值类型包括: (1) 整型 int :可以存储范围为 -4294967296 ~ 4294967296 的整数,比如 a = 1234 (2) 长整型 long :可以存储范围比整型更大的整数,比如 a = 88888888888888888 (3) 浮点型 float :存储小数,比如 a = ...
分类:
编程语言 时间:
2017-04-07 10:14:47
阅读次数:
189
# 变量名: 1.数字,字母,下划线组成 2.不能以数字开头 3.变量名不是Python内部的关键字 基本的数据类型: 数字:1231 age = 18 字符串: a1 = "asdsadasda" a1 = 'adsadsadad' a1 = """asdasdasd""" 布尔值: # 只有两种 ...
分类:
其他好文 时间:
2017-04-06 22:02:51
阅读次数:
129
Robot Framework (based on Python) + Selenium WebDriver NightWatch Framework (based on Node.js) + Selenium WebDriver Cucumber Framework (based on Ruby) ...
分类:
Web程序 时间:
2017-04-06 20:00:09
阅读次数:
160
前言:很多python教程中,对python的解释不容易理解,本文记录自己的理解和体会,是对迭代器和生成器的初步理解。 迭代器: 迭代器的实质是实现了next()方法的对象,常见的元组、列表、字典都是迭代器。 迭代器中重点关注两种方法: __iter__方法:返回迭代器自身。可以通过python内建 ...
分类:
编程语言 时间:
2017-04-06 14:47:15
阅读次数:
198
1、在命令行中启动Python脚本的时候,经常会用到-m参数,那么-m起了什么作用呢? 2、先看看 python --help 给出的信息: run library module as a script (terminates option list) 意思是将库中的python模块用作脚本去运行。 ...
分类:
编程语言 时间:
2017-04-05 23:36:52
阅读次数:
224
在测试雷达时,往往需要测试雷达的数据是否准确,这时就需要在雷达图中显示一条标准的直线作为对比。"create a wall"import numpy as npimport matplotlib.pyplot as pltimport sysdef main(distance): theta = n... ...
分类:
编程语言 时间:
2017-04-05 21:31:28
阅读次数:
180
定义闭包(closure)即在函数中又有函数的定义,例如:def fun1(str): print("this is fun1 str") def fun2(str1): print("this is fun2 str and parameter from fun1 %s" %str1) fun2(... ...
分类:
编程语言 时间:
2017-04-05 21:27:34
阅读次数:
196
python有一个内置的数据类型(或者说对象,因为python的一切皆对象),在使用时遇到一些疑问,特此整理定义字典(dict)是一个大括号括起来的key:value对(类似于c++的map容器)。str = {'url': 'http://www.cnblogs.com/WeyneChen/', ... ...
分类:
编程语言 时间:
2017-04-05 21:21:00
阅读次数:
150
普通字符串一般字符串都是已unicode编码,且和C类似,可以使用\来转义,比如a = "test\ntest"print(a)输出testtest前面加r在字符串前面加上一个 r 表示该字符串为raw string,不识别转义。b = r"test\ntest"print(b)输出test\nte... ...
分类:
编程语言 时间:
2017-04-05 21:17:54
阅读次数:
188