题解 | #班级管理#
班级管理
https://www.nowcoder.com/practice/e5539db11767449ab2fb68ed3c2446d0
class Student(object): def __init__(self, name, number, score, grade): self.name = name self.number = number self.score = score self.grade = grade def student_info(self): return "%s's student number is %s, and his grade is %s. He submitted %s assignments, each with a grade of %s" % ( self.name, self.number, self.score, len(self.grade), " ".join(self.grade), ) name = input() number = input() score = input() grade = list(input().split(" ")) student = Student(name, number, score, grade) print(student.student_info())