- 博客(9)
- 资源 (11)
- 收藏
- 关注
原创 python函数
函数代码块以def关键词开头,后接函数标识符名称、圆括号()和:,任何传入参数和自变量必须放在圆括号中间,圆括号之间可以用于定义参数,也可以不定义任何形参。函数主体以Tab缩进。函数结束时可以return参数也可以不返回,如果返回可以返回1个参数也可以返回多个参数。不返回参数:>>> #def function_name(parameters):>>> #stateme
2017-04-09 15:38:08 434
原创 python while刷博
init_varwhile condition: statement modify_var etc.else: statement etc.while的判定条件语句布尔表达式 True False关系表达式 逻辑表达式 and or notPython 2.7.3 (default, Apr 10 2012, 23:3
2017-04-09 01:02:53 464
转载 python time模块
在平常的代码中,我们常常需要与时间打交道。在Python中,与时间处理有关的模块就包括:time,datetime以及calendar。这篇文章,主要讲解time模块。在开始之前,首先要说明这几点:在Python中,通常有这几种方式来表示时间:1)时间戳 2)格式化的时间字符串 3)元组(struct_time)共九个元素。由于Python的time模块实现主要调用C库,所以各
2017-04-09 00:46:39 477
原创 Python for 循环
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32Type "copyright", "credits" or "license()" for more information.>>> #Python for 循环>>> #>>> #for target in sequence
2017-04-08 23:15:46 5698
原创 urllib和webbrowser使用
第三方提供函数库urllib和webbrowser使用,urllib访问网页,webbrowser调用浏览器,对浏览器进行操作。Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32Type "copyright", "credits" or "license()" for more
2017-04-04 23:09:55 971
原创 windows系统python安装httplib2
1、第三方函数库httplib2下载地址:https://pypi.python.org/pypi/httplib2/ 下载最新版本,比如httplib2 0.10.3。2、解压httplib2-0.10.3.tar.gz到某目录。3、配置python在dos下的运行环境。4、在dos下安装httpLib2模块。运行cmd,cd到httplib2-0.10.3的解压后文件夹h
2017-04-04 22:45:17 4235
原创 Python常用系统库str、math、os、socket
Python常用系统库str、math、os、socket。Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32Type "copyright", "credits" or "license()" for more information.####################
2017-04-04 17:37:04 1102
原创 Python变量解析
1、Python变量名可以包含字母、数字和下划线(_),变量不能以数字开头。2、Python数据类型不需要指定type。3、Python变量的“变”是指向,id。Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32Type "copyright", "credits" or "
2017-04-04 14:20:08 822
原创 插入排序
插入排序适用于少量元素的排序。// InsertionSort.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #include /*for j = 2 to A.length key = A[j] //将A[j]插入到前面
2017-04-03 19:37:08 370
Visual Leak Detector-1.0
2016-02-21
AT89S52单片机的数码管的动态显示程序
2010-05-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人