In C++, I can do something like
struct sample{
char name[100];
int roll;
}x[100];
x[0].roll=5;
x[0].name="Asdfgh";
Here I can add a maximum of 100 elements, and change the value of their attributes whenever I want.
What python code that achieves the same thing?
I'm assuming namedtuples
will not work in this way because it is immutable.