# -*- coding: UTF-8 -*-
# 作者：huanhuilong
# 标题：Python 类和对象
# 描述：创建学生类, 创建一个学生列表，加入3个学生，循环打印学生信息

class Student:
    def __init__(self, no, name, age):
        self.no = no
        self.name = name
        self.age = age

    def dump(self):
        print('')
        print(f"* no:{self.no}")
        print(f"* name:{self.name}")
        print(f"* age:{self.age}")


if __name__ == '__main__':
    students = []
    for i in range(0, 3):
        s = Student(i, f'somebody_{i}', 20+i)
        students.append(s)

    for s in students:
        s.dump()
