The function will return a list of dictionaries that describe your relationship classes. You can analyse this list in the Python Window, but if you want to save it, you'll have to write extra code. Something like this:
database = "G:/ArcGIS/projects/Test/Test.gdb"
out_csv = "G:/ArcGIS/projects/Test/Relationships.csv"
all_rs = listRelationshipClasses(database)
lines = ["Name", "Origin", "Destination", "Cardinality", "Composite"]
for rs in all_rs:
lines.append( [rs["name"], rs["originClassNames"][0], rs["destinationClassNames"][0], rs["cardinality"], str(rs["isComposite"])] )
with open(out_csv, "w") as f:
for line in lines:
f.write(",".join(line) + "\n")
Have a great day!
Johannes