home » python
Python

Python is one of my favorite programming language. I'll write up some useful tutorials for new python users.

Reference

(the latter part will be re-written)

Python2 vs. Python3

Indentation and Scope

Interactive mode vs. Script mode

Python is a good calculator in interactive mode.

Program Flow

top to bottom

__main__

If, Else, and While

Define

Variable

You don't have to define it explicitly. Just use, then it will be stored. A type of a variable is also automatically determined.

Function

Class

Data Types

Tuple

Trick

Easy returning

List

Difference between Tuple and List

The length of tuple cannot be changed, but we can always change the length of list. Just think of tuple as a integer.

Manipulation

Useful functions

Dictionary

Useful functions

Importing

http://docs.python.org/tutorial/modules.html

Regular Expression

Defining Functions and Class

Useful String Functions

Advanced List Manipulations: filter and map

Regular Expressions

SQL connections

created: 2011/04/21/ 21:06:45, modified: 2012/09/29/ 19:02:25

«edit» «inkdrop»