python self

class Student(object):
    def __init__(self, name, score):
        self.name = name
        self.score = score

st=Student('lg',99)

print(st.name)
lg
posted @ 2018-06-26 13:45  luoganttcc  阅读(86)  评论(0编辑  收藏  举报