![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
文章平均质量分 67
NonStatic
这个作者很懒,什么都没留下…
展开
-
Python 3.3 Tutorial Notes - 4:Modules
1. File name is the module name2. where you call the "import", where the module will be put into the destination file. This means, if a module contains some code out of any functions, it will be execu原创 2015-09-04 23:57:13 · 336 阅读 · 0 评论 -
Python 3.3 Tutorial Notes - 6:Error and Exception
1. Handle exception: try-except. An except clause may name multiple exceptions as a parenthesized tuple.>>> while True:... try:... x = int(input("Please enter a number: "))...原创 2015-09-04 23:57:19 · 367 阅读 · 0 评论 -
Python 3.3 Tutorial - Online Resource
Will update this post once I see anything new and useful.Basic Documents: http://docs.python.org/3.3/contents.html To Be Continued...原创 2015-09-04 23:57:00 · 252 阅读 · 0 评论 -
Python 3.3 Tutorial Notes - 7:Class
1. Allow multiple base classes2. namespace: Most namespaces are currently implemented as Python dictionaries3. attribute: 3.1 for any name following a dot — for example, in the expression z.real原创 2015-09-04 23:57:21 · 371 阅读 · 0 评论 -
Python 3.3 Tutorial Notes - 1:Basic
1. "/": Division, always return float2. "//": Floor division, return integer3. "%": Reminder, return integer 1. "**": Power 1. Interactive mode, "_" means the value of the last printed expression. "_"原创 2015-09-04 23:57:06 · 405 阅读 · 0 评论 -
Python 3.3 Tutorial 阅读笔记
多年前用过Python 2.4,如今要重新捡起来用了,所以干脆直接看3.3。从官网上找来文档,用了一个星期,扫了一遍,感觉变化很大啊。做了点笔记,先把未整理版放上来,以后有空慢慢排版并且把sample code贴到GitHub(但愿以后有空。。。)官网文档:http://docs.python.org/3/tutorial/ 重要参考:http://docs.python.org/3.3/cont原创 2015-09-04 23:57:03 · 312 阅读 · 0 评论 -
Python 3.3 Tutorial Notes - 5:Input and Output
1. Format string: str.Format()2. Convert to string: str(), repr() 2.1 The str() function is meant to return representations of values which are fairly human-readable 2.2 repr() is meant to gen原创 2015-09-04 23:57:16 · 366 阅读 · 0 评论 -
Python 3.3 Tutorial Notes - 3:Data Structure
1. List 1.1 list.pop([i]), list.sort(), list.reverse() 1.2 insert, remove or sort that modify the list have no return value printed – they return None. 1.3 list.pop() and deque.popleft()原创 2015-09-04 23:57:11 · 348 阅读 · 0 评论 -
Python 3.3 Tutorial Notes - 2:Control Flow
1. if, else, elif1. Iterating over a sequence does not implicitly make a copy.2. "for" in Python is "foreach" in C#3. range(n) means n numbers: 0..n-1, good for for-loop4. range(n) is an object which原创 2015-09-04 23:57:08 · 326 阅读 · 0 评论 -
Python 3.3 Tutorial Notes - 8:Standard Libraries - Briefly
1. OS 1.1 import os 1.2 import shutil2. File wildcards 2.1 import glob3. Command line arguments 3.1 import sys 3.2 sys.stderr and sys.exit() are also useful4. String Pattern Matchi原创 2015-09-04 23:57:24 · 358 阅读 · 0 评论