常用的packageNumbericNumPySciPy ODE PDE
pyhton script.pypython -i scipt.py 可以与之交谈
SymbolicPythonJava or C++Numerical Statisticalmatrix在Python中whitespace是有意义的
MTC-Model Template ViewTemplate displays information View fetches information
Arraysare not a built-in python type.included in Numeric, NumPyfrom numpy import *vec = array([1,2,3])mat = array([[1,2,3],[4,5,6],[7,8,9]])Lists & ArraysThe biggest difference arrays and lists is speed:it's much faster to carry out operatons on arrays than on each term in a given list.
Stringsrepeated with the * sign‘abc’*3abcabcabcs[i:j]fetches elements i(inclusive)through j(not inclusive)s[i:j:k]extracts every kth element starting with index i and ending with index j.Tuplesa immutable list()
Integers are implemented as C longs.Float implemented as C doubles
Modulescollection of stuff-functions, classes, variablesPackagescollection of modules in directory Eclipse
import
variablesno need to declareneed to assigneverything is a variableno array
significant whitespacewhitespace is meaningful in python:especially indentation an placement of newlines.
whitespace is meaningful
multiple inheritancefree mixoble