Learning Python

2008年11月10日 22:54

Shell Script

#!/usr/local/bin/python

String

Raw Strings :

r"C:\new\test"
'C:\\new\\test'

Copy

If you want a complete copy which copy nested data structures, use the strandard copy module:

import copy
X=copy.deepcopy(Y)

Comparisons, Equality

The ==  operator tests value equivalence
The  is  operator tests object identity