1 Star 0 Fork 455

犽犽 / learngit

forked from 廖雪峰 / learngit 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Hello,Michael.py 720 Bytes
一键复制 编辑 原始数据 按行查看 历史
MaroonLk 提交于 2018-05-28 02:52 . From Maroonlk. 0528
"""
你好,廖老师
我在您网站学习python有半个月了
目前在OOP阶段
不断探索
感谢您的网站
给了很多人学习的机会~
希望可以被选上
嘿嘿
"""
class Me(object):
__slots__ = ("name", "age", "hobby", "address")
def __init__(self, name, age, hobby, address):
self.name = name
self.age = age
self.hobby = hobby
self.address = address
def say_hi(self):
print("Hi, my name is {0}".format(self.name))
print("I'm {0} year old".format(self.age))
print("I like {0}, and I'm come from {1}".format(self.hobby, self.address))
print("Thanks for Michael Liao")
me = Me("Like", 22, "coding", "ChengDu")
me.say_hi()
1
https://gitee.com/isuye/learngit.git
git@gitee.com:isuye/learngit.git
isuye
learngit
learngit
master

搜索帮助