.#!/usr/bin/python
class Student(object):
def init(self,name):
self.name=name
std=Student(123)
std.name="tay"
print(std.name)
std.name="aaa"
print(std.name)
.#!/usr/bin/python
class Student(object):
def init(self,name):
self.name=name
std=Student(123)
std.name="tay"
print(std.name)
std.name="aaa"
print(std.name)
本文标题:调用对象里的方法
本文链接:https://www.haomeiwen.com/subject/bwuqzttx.html
网友评论