【内容讲解】
1、创建多个对象的格式:
对象名 = 类名()
对象名 = 类名()
对象名 = 类名()
【代码实现】
"""
1、创建多个对象的格式:
对象名 = 类名()
对象名 = 类名()
对象名 = 类名()
"""
class Student(object):
def eat(self, food):
print("吃%s" % food)
def sleep(self, where):
print(f"睡在{where}")
def study(self, course):
print(f"学习{course}")
# 对象1
student1 = Student()
# 对象2
student2 = Student()
# 对象3
student3 = Student()