码迷,mamicode.com
首页 >  
搜索关键字:python list    ( 182949个结果
一入python深似海--split
下面说说split函数的用法 def break_words(stuff): """This function will break up words for us.""" words = stuff.split(' ')#split('.',1) use '.' split one time return words def sort_words(wo...
分类:编程语言   时间:2014-06-08 18:19:21    阅读次数:336
为PyCharm添加不同解释器
正常大家会使用Python官网的安装包,即Python。由于自己尝试了下IronPython,但打开PyCharm查看配置,发现并没有IronPython的解释器,这个需要自己加进去
分类:其他好文   时间:2014-06-08 06:27:40    阅读次数:6420
Python的二维数组
Python一维数组初始化:>>> list=[]>>> type(list)>>> list[]Python二维数组初始化:>>> lists = [[]] * 3>>> lists[[], [], []]>>> lists[0].append(3)>>> lists[[3], [3], [3]]...
分类:编程语言   时间:2014-06-07 23:49:56    阅读次数:563
python socket
# -*- coding: utf-8 -*- import socket import sys port = 80 host = sys.argv[1] filename = sys.argv[2] soc = socket.socket(socket.AF_INET, socket....
分类:编程语言   时间:2014-06-07 23:43:22    阅读次数:320
用一个集合这么难?
集合有序否允许元素重复否Collection否是List是是SetAbstractSet否否HashSetTreeSet是(用二叉树排序)MapAbstractMap否使用key-value来映射和存储数据,Key必须惟一,value可以重复HashMapTreeMap是(用二叉树排序)目的:用数组...
分类:其他好文   时间:2014-06-07 23:42:39    阅读次数:312
python计算均值方差
用Python求均值与方差,可以自己写,也可以借助于numpy,不过到底哪个快一点呢?我做了个实验,首先生成9百万个样本:```pythonnlist=range(0,9000000)nlist=[float(i)/1000000 for i in nlist]N=len(nlist)```第二行是...
分类:编程语言   时间:2014-06-07 22:48:05    阅读次数:1623
Windows 7下解决: java.net.SocketException: No buffer space available (maximum connections reached?)
查了一大堆网上的资料全都没用,Google得知,是Windows 7 的socket泄漏 :https://supportkb.riverbed.com/support/index?page=content&id=S23580&actp=LIST_RECENT补丁下载地址: http://suppo...
分类:编程语言   时间:2014-06-07 22:19:32    阅读次数:857
Linux 内核 链表 的简单模拟(2)
接上一篇Linux 内核 链表 的简单模拟(1) 第五章:Linux内核链表的遍历/*** list_for_each - iterate over a list* @pos: the &struct list_head to use as a loop cursor.* @...
分类:系统相关   时间:2014-06-07 22:09:58    阅读次数:451
数据结构中线性表的基本操作-合并两个线性表-依照元素升序排列
#include#include#define LIST_INIT_SIZE 10/*线性表初始长度*/#define LIST_CREATENT 2/*每次的增量*/typedef int ElemType;using namespace std;typedef struct SqList/*线性...
分类:其他好文   时间:2014-06-07 21:01:21    阅读次数:322
LeetCode OJ - Partition List
题目:Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the or...
分类:其他好文   时间:2014-06-07 20:35:55    阅读次数:236
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!