how to define a structure like in C

Viewed 82417

I am going to define a structure and pass it into a function:

In C:

struct stru {
int a;
int b;
};

s = new stru()
s->a = 10;

func_a(s);

How this can be done in Python?

4 Answers
Related