
python学习笔记
文章平均质量分 66
野小喵
我祈祷拥有一颗透明的心灵,和会流泪的眼睛。
展开
-
Python Join Examples
原文链接:点我OverviewThis post will show some examples of the Python join method. What is important to remember is that the character that joins the elementsis the one upon which the function is转载 2015-09-08 10:12:00 · 474 阅读 · 0 评论 -
Google Python Class 之——带参数的WordCount 实现
#!/usr/bin/python -tt# Copyright 2010 Google Inc.# Licensed under the Apache License, Version 2.0# http://www.apache.org/licenses/LICENSE-2.0# Google's Python Class# http://code.google.com/edu/l原创 2015-09-02 13:42:25 · 868 阅读 · 0 评论 -
Google Python Class 之——正则表达式提取html网页数据字段
需要提取的内容格式:Popularity in 1990....1MichaelJessica2ChristopherAshley3MatthewBrittany#!/usr/bin/python# Copyright 2010 Google Inc.# Licensed under the Apache License, Version 2.0# htt原创 2015-09-06 16:14:09 · 2489 阅读 · 0 评论 -
Google Python Class 学习笔记(2) 正则表达式
1、Regular Expressiona, X, 9, -- ordinary characters just match themselves exactly. The meta-characters which do not match themselves because they have special meanings are: . ^ $ * + ? { [ ]原创 2015-09-06 16:23:59 · 761 阅读 · 0 评论 -
Python 库之 os 源码
r"""OS routines for Mac, NT, or Posix depending on what system we're on.This exports: - all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc. - os.path is one of the modules posixpat原创 2015-09-06 16:56:28 · 3036 阅读 · 0 评论 -
Python Dict 词典的用法
Dict Hash TablePython's efficient key/value hash table structure is called a "dict". The contents of a dict can be written as a series of key:value pairs within braces { }, e.g. dict = {key1:value翻译 2015-09-29 15:39:51 · 899 阅读 · 0 评论 -
python string 使用正则表达式 split()
By using (,), you are capturing the group, if you simply remove them you will not have this problem.>>> str1 = "a b c d">>> re.split(" +", str1)['a', 'b', 'c', 'd']However there翻译 2015-09-29 18:54:43 · 5373 阅读 · 0 评论 -
Google Python Class 学习笔记(1) Introduce String list del
1、python 带参数的main函数: if len(sys.argv) >= 2: name = sys.argv[1] else: name = 'World'如 运行 pyhon hello.py Zhang,参数数组argv中,第一个参数是hello.py 之后才是真正带的参数,与C++相同,但是与java不同,java直接是第一个。原创 2015-09-02 14:30:33 · 773 阅读 · 0 评论