python tutorial 學習筆記(一)

built-in funcitons

raw_input([String])

range(int,[int],[int])

keyword lambda: small anonymous function

control flow:

if,elif,else ( no switch in python)

for x in a; for x in a[:]; it iterates aan array

while

break,continue

pass

Define Functions:

local variable, global variable,  global statment

arguments are passed call by value, where the value is always an object reference, not the value of the object

default argument values

keyword arguments

*arguments : arbitrary number of arguments, unpacking argument lists

**keywords:  a dictionary containing all keyword arguments except those corresponding to a formal parameter

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章