看到http://www.cnblogs.com/vamei/archive/2012/06/02/2532018.html写的PYTHON大蟒蛇教程入门,
现在这个在LINUX里很普及的,学学基本语法了。。。
class Human(object):
def __init__(self,input_gender):
self.gender = input_gender
def printGender(self):
print self.gender
li_lei = Human('male')
print li_lei.gender
li_lei.printGender()
class happyBird(object):
def __init__(self,more_words):
print 'We are happy birds.',more_words
summer = happyBird('Happy,Happy!')
~
~
"hello.py" 17L, 340C written