Structs in Python
Go’s structs are typed collections of fields.
They’re useful for grouping data together to form
records.
This person
struct type has name
and age
fields.
To run this Python code, put the code in a file named structs.py
and use the Python interpreter to execute it.
Next example: Methods.