I want to use struct on the python as like below C style.
typedef
{
int a;
int b;
}my_struct_t;
my_strut_t func(my_strut_t ttt, int var1, int var2)
{
ttt.a = var1;
ttt.b = var2;
return ttt;
}
main()
{
my_struct_t my_struct;
my_struct = func(my_struct, 10, 20);
printf("a=%d, b=%d", my_struct.a, my_struct.b);
}
Could you translate above C style code to python script?
Thank you.