Playing with the structure examples in the book reminds me of accessing attributes to a python Class
That's not a bad analogy. A structure in C++ is just a class with different default access (public instead of private). A union is different in that all members of a union share the same block of memory rather than each member having its own block of memory.