码迷,mamicode.com
首页 > 编程语言 > 详细

Python 学习 转载(出处:http://www.cnblogs.com/vamei )加心得 3days

时间:2016-12-11 02:56:36      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:print   object   http   man   range   int   nbsp   .sh   心得   

def pp(x):
print(‘as‘)
def k():
print (‘k‘)
k()//k()必须在def k()同列 才能调用def k()
print (pp(2)) //当有2时,pp(x)必须要有参数

class Human(object):
   laugh = ‘hahahaha‘
   def show_laugh(self):
        print self.laugh
   def laugh_100th(self):
         for i in range(100):
             self.show_laugh()//也可以调用 show_laugh()

Python 学习 转载(出处:http://www.cnblogs.com/vamei )加心得 3days

标签:print   object   http   man   range   int   nbsp   .sh   心得   

原文地址:http://www.cnblogs.com/cln-chaoren/p/6158783.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!