Suppose I have two lists, the first is named studentName
studentName = ["Jack","Simon","John","Matthew"]
And the second is named studentGrade
studentGrade = [100,88,74,94]
I also have a class named "Students"
class Students():
def __init__(self,name,grade):
self.name = name
self.grade = grade
How do I create objects without using the usual method like this:
Jack = Students("Jack",100)
I want to do the same but without having to type 4 lines. Instead I want to use loops on the lists. Is this possible?