📅  最后修改于: 2022-03-11 14:45:34.350000             🧑  作者: Mango
class fruit:
def __init__(self,color,taste,name):
self.color = color
self.name = name
self.taste = taste
def myfunc(self):
print("{} = Taste:{}, Color:{}".format(self.name, self.taste, self.color))
f1 = fruit("Red", "Sweet", "Red Apple")
f1.myfunc()