The syntax is python, so you can look it up here.
There's of course a lot of stuff to get your hands on. Here you will find the official SDK documentation with lots of examples on GitHub to help getting started.
Your code didn't work, because you did not access the returned list correctly.
The correct way would be:
cube = doc.GetActiveObjects(c4d.GETACTIVEOBJECTFLAGS_0)
# note: It is better to write out flags and not set the Ints directly. More readable and less error-prone to API changes.
You can read it up here: GetActiveObjects()
You may want to consider using GetActiveObject(), which returns the current active object only (Returns
None in case of multiple objects - see docs).