看到http://www.cnblogs.com/vamei/archive/2012/06/02/2532018.html写的PYTHON大蟒蛇教程入门,

现在这个在LINUX里很普及的,学学基本语法了。。。

玩玩python

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

相关文章:

  • 2021-09-23
  • 2021-09-25
  • 2022-12-23
  • 2021-04-06
  • 2021-09-15
  • 2021-09-19
  • 2021-08-14
  • 2021-07-06
猜你喜欢
  • 2021-06-07
  • 2022-02-13
  • 2021-11-30
  • 2021-12-23
  • 2021-06-26
  • 2021-11-28
  • 2021-08-27
相关资源
相似解决方案