python
文章平均质量分 77
guilanl
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python 的 zipfile 模块
zipfile 模块用于在python 中做压缩、解压缩。 下面是一个例子: #/usr/bin/python3 import os import time import zipfile source_dir = "/home/guilan/development/algorithm" filename = "/home/guilan/development/pytho原创 2016-07-01 10:01:24 · 867 阅读 · 0 评论 -
Python 的切片操作以及 利用步长对序列进行倒序取值
切片操作: 对于具有序列结构的数据来说,切片操作的方法是:consequence[start_index: end_index: step]。 start_index:表示是第一个元素对象,正索引位置默认为0;负索引位置默认为 -len(consequence) end_index:表示是最后一个元素对象,正索引位置默认为 len(consequence)-1;负索引位置默认为原创 2016-09-09 15:42:02 · 9123 阅读 · 0 评论 -
Python3: urllib.request 的使用
Python3 的urllib 包含三个部分: urllib is a package that collects several modules for working with URLs: urllib.request for opening and reading URLsurllib.error containing the exceptions raised by u原创 2016-09-23 15:41:17 · 2004 阅读 · 0 评论 -
Python -- Built in functions
Today, we cover a handful of the built-in functions with Python 3. For a full list, see: https://docs.python.org/3/library/functions.html We cover absolute value (abs()), the help() functions, max(原创 2016-11-03 14:13:58 · 366 阅读 · 0 评论 -
Python 中正则表达式的使用浅析
Python 学习,请参考这个网站: https://pythonprogramming.net/ 很多专题,每个都有视频,我觉得讲得不错。 Python 中的 正则表达式 (Regular Expression)的模块是: re 正则表达式中常见的各种rule: Identifiers: \d = any number\D = an原创 2016-09-29 11:39:10 · 435 阅读 · 0 评论 -
Python os.walk() 方法
Description The method walk() generates the file names in a directory tree by walking the tree either top-down or bottom-up. Syntax Following is the syntax for walk() method: os.walk(top[, top原创 2016-10-19 11:04:09 · 697 阅读 · 0 评论 -
用python 读取和写入CSV格式的文件
This Python 3 tutorial covers how to read CSV data in from a file and then use it in Python. For this, we use the csv module. CSV literally stands for comma separated variable, where the comma is what原创 2016-11-03 12:03:08 · 9124 阅读 · 0 评论
分享