I am new to python. I am familiar with C++. I would convert the flowing C++ code to python.
class School{
School(char *name, int id, Student* pointers){
{
this.name=name;
this.weapon=weapon;
this.students=pointers;
}
print(){
for(int i=0;i<10;i++){
this.students.print();
}
}
};
As you see I am trying to pass a pointer to an array of objects of type Student I am not sure if python allow me to pass pointers. This is what I did in python
class School():
def __init__(self, name, *students):
self.name=name
self.students=students
def display(self):
for student in self.students
student.display()