第28068题 单选题
关于Python类的实例初始化方法`__init__`,下列说法正确的是?

以下是一段测试用的Python类代码:

class Student:
    def __init__(self, name, age=18):
        self.stu_name = name
        self.stu_age = age

# 实例化测试
s1 = Student("张三")
s2 = Student("李四", 20)
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析