摘要: For 32-bits windows:1.安装Python(我安装的是Python2.7,目录C:\Python27)可以到CSDN、OSChina、Sina Share等网站下载也可以到Python官网下载:http://www.python.org/2.安装NumPy(可选)到这里下载:http://sourceforge.net/projects/numpy/files/NumPy/1.6.2/numpy-1.6.2-win32-superpack-python2.7.exe注意Py版本下载之后执行exe文件(程序会自动搜索python27目录)3.安装NLTK(我下载的是nltk-2 阅读全文
posted @ 2012-11-05 22:45 ZH奶酪 阅读(13069) 评论(5) 推荐(1) 编辑
摘要: 以安装Beautifulsoup4为例:1.到网站上下载:http://www.crummy.com/software/BeautifulSoup/bs4/download/2.解压文件到C:\Python273.cmd运行C:\Python27\BeautifulSoup>python setup... 阅读全文
posted @ 2012-11-05 14:44 ZH奶酪 阅读(19909) 评论(4) 推荐(3) 编辑
摘要: 无论学习哪门计算机语言,只要把100例中绝大部分题目都做一遍,就基本掌握该语言的语法了。 【程序1】 题目:有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少? #Filename:001.py cnt = 0#count the sum of result for i in 阅读全文
posted @ 2012-11-05 14:40 ZH奶酪 阅读(133358) 评论(65) 推荐(16) 编辑
摘要: 需要注意的几点:1.list的初始化2.cPickle的load和dump方法的使用3.class的存储4.sort函数的使用5.global标签的使用6.初始的时候不存在memberlist.data或者文件内容为空解决方法2016.01.127.begin函数:初始的时候文件中有内容,调用rea... 阅读全文
posted @ 2012-11-05 11:27 ZH奶酪 阅读(6767) 评论(8) 推荐(1) 编辑
摘要: Help on class str in module __builtin__:关于__builtin__模块中str类的帮助信息:class str(basestring)| str(object) -> string| | Return a nice string representation of the object.| If the argument is a string, the return value is the same object.【返回一个对象的string格式】| | Method resolution order:| str| basestring| ob 阅读全文
posted @ 2012-11-05 09:10 ZH奶酪 阅读(23112) 评论(0) 推荐(0) 编辑