I have an array of arrays. Each of the nested arrays contains information about a student. I'm then iterating over it and saving each of the arrays into a student object and persisting that into my DB.
students = [
["James", "Smith", 4, 10],
# more students here
]
for s in students:
student = Student()
student.first_name = s[0],
student.last_name = s[1],
student.classroom = s[2],
student.grade1 = s[3],
student.save()
The field classroom in the Student class is defines as a FloatField.
I'm getting following error:
TypeError: Field 'classroom' expected a number but got (4,).
What can be the cause for this?
EDIT 1: typo