定义函数:
def function_name(a,b,c): statement return sth. # return不是必须的
定义类:
class class_name(object): attribute statement
注:类括号中若是object,则表示这个类没有父类。
posted on 2015-04-18 15:07 _dshizhh 阅读(122) 评论(0) 收藏 举报